Revert "Show timezone in posts"
This reverts commit 6ae3b5c508.
Datetimes will be converted to the timezone set by the TIME_ZONE django setting
This commit is contained in:
parent
6ae3b5c508
commit
9ad6a1a7b8
5 changed files with 4 additions and 17 deletions
|
|
@ -72,9 +72,7 @@ class PostModal extends React.Component {
|
||||||
<div className="post__header">
|
<div className="post__header">
|
||||||
<h2 className={titleClassName}>{`${post.title} `}</h2>
|
<h2 className={titleClassName}>{`${post.title} `}</h2>
|
||||||
<div className="post__meta-info">
|
<div className="post__meta-info">
|
||||||
<span className="post__date">
|
<span className="post__date">{publicationDate}</span>
|
||||||
{publicationDate} {this.props.rule.timezone}
|
|
||||||
</span>
|
|
||||||
{post.author && <span className="post__author">{post.author}</span>}
|
{post.author && <span className="post__author">{post.author}</span>}
|
||||||
{this.props.category && (
|
{this.props.category && (
|
||||||
<span className="badge post__category" title={this.props.category.name}>
|
<span className="badge post__category" title={this.props.category.name}>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class PostItem extends React.Component {
|
||||||
|
|
||||||
<div className="posts-info">
|
<div className="posts-info">
|
||||||
<span className="posts-info__date" title={publicationDate}>
|
<span className="posts-info__date" title={publicationDate}>
|
||||||
{publicationDate} {rule.timezone} {post.author && `By ${post.author}`}
|
{publicationDate} {post.author && `By ${post.author}`}
|
||||||
</span>
|
</span>
|
||||||
{this.props.selected.type == CATEGORY_TYPE && (
|
{this.props.selected.type == CATEGORY_TYPE && (
|
||||||
<span className="badge">
|
<span className="badge">
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,4 @@ class RuleSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = CollectionRule
|
model = CollectionRule
|
||||||
fields = (
|
fields = ("id", "type", "name", "url", "favicon", "category", "user", "unread")
|
||||||
"id",
|
|
||||||
"type",
|
|
||||||
"name",
|
|
||||||
"url",
|
|
||||||
"favicon",
|
|
||||||
"category",
|
|
||||||
"user",
|
|
||||||
"unread",
|
|
||||||
"timezone",
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% url "news:collection:rules" as cancel_url %}
|
{% url "news:collection:rules" as cancel_url %}
|
||||||
{% include "components/form/form.html" with form=form title="Update feed" cancel_url=cancel_url confirm_text="Save feed" %}
|
{% include "components/form/form.html" with form=form title="Update feed" cancel_url=cancel_url confirm_text="Save feed" only %}
|
||||||
</main>
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ class CollectionRuleDetailViewTestCase(TestCase):
|
||||||
self.assertTrue("favicon" in data)
|
self.assertTrue("favicon" in data)
|
||||||
self.assertTrue("category" in data)
|
self.assertTrue("category" in data)
|
||||||
self.assertTrue("type" in data)
|
self.assertTrue("type" in data)
|
||||||
self.assertTrue("timezone" in data)
|
|
||||||
|
|
||||||
def test_not_known(self):
|
def test_not_known(self):
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue