diff --git a/files/classes/clients.py b/files/classes/clients.py index a020f73e8..59a5ba0c2 100644 --- a/files/classes/clients.py +++ b/files/classes/clients.py @@ -25,16 +25,6 @@ class OauthApp(Base): return f"" - @property - @lazy - def created_date(self): - return time.strftime("%d %B %Y", time.gmtime(self.created_utc)) - - @property - @lazy - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) - @property @lazy def permalink(self): @@ -76,14 +66,4 @@ class ClientAuth(Base): application = relationship("OauthApp") def __repr__(self): - return f"" - - @property - @lazy - def created_date(self): - return time.strftime("%d %B %Y", time.gmtime(self.created_utc)) - - @property - @lazy - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) \ No newline at end of file + return f"" \ No newline at end of file diff --git a/files/classes/flags.py b/files/classes/flags.py index 6b1d2873b..31c930a58 100644 --- a/files/classes/flags.py +++ b/files/classes/flags.py @@ -24,16 +24,6 @@ class Flag(Base): def __repr__(self): return f"" - @property - @lazy - def created_date(self): - return time.strftime("%d %B %Y", time.gmtime(self.created_utc)) - - @property - @lazy - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) - @lazy def realreason(self, v): return censor_slurs(self.reason, v) @@ -57,16 +47,6 @@ class CommentFlag(Base): def __repr__(self): return f"" - @property - @lazy - def created_date(self): - return time.strftime("%d %B %Y", time.gmtime(self.created_utc)) - - @property - @lazy - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) - @lazy def realreason(self, v): return censor_slurs(self.reason, v) \ No newline at end of file diff --git a/files/classes/mod.py b/files/classes/mod.py index 290db4cb6..ff2c3b4ec 100644 --- a/files/classes/mod.py +++ b/files/classes/mod.py @@ -16,9 +16,4 @@ class Mod(Base): super().__init__(*args, **kwargs) def __repr__(self): - return f"" - - @property - @lazy - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) \ No newline at end of file + return f"" \ No newline at end of file diff --git a/files/classes/polls.py b/files/classes/polls.py index 330688518..f26344b53 100644 --- a/files/classes/polls.py +++ b/files/classes/polls.py @@ -48,11 +48,6 @@ class SubmissionOptionVote(Base): def __repr__(self): return f"" - @property - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) - - class CommentOption(Base): @@ -96,8 +91,4 @@ class CommentOptionVote(Base): super().__init__(*args, **kwargs) def __repr__(self): - return f"" - - @property - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) \ No newline at end of file + return f"" \ No newline at end of file diff --git a/files/classes/submission.py b/files/classes/submission.py index 328ed14fa..bf267192b 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -102,11 +102,6 @@ class Submission(Base): def created_datetime(self): return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) - @property - @lazy - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) - @property @lazy def age_string(self): @@ -169,12 +164,6 @@ class Submission(Base): return f"{years}yr ago" - @property - @lazy - def edited_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.edited_utc))) - - @property @lazy def score(self): diff --git a/files/classes/user.py b/files/classes/user.py index f4900800c..fc7b86fa2 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -685,18 +685,6 @@ class User(Base): def applications(self): return g.db.query(OauthApp).filter_by(author_id=self.id).order_by(OauthApp.id).all() - @property - @lazy - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) - - @property - @lazy - def last_active_datetime(self): - if self.last_active == 0: - return "never" - return str(time.strftime("%Y-%m-%d %H:%M:%SZ", time.gmtime(self.last_active))) - @property @lazy diff --git a/files/classes/votes.py b/files/classes/votes.py index 67df64d47..f0c54d3d5 100644 --- a/files/classes/votes.py +++ b/files/classes/votes.py @@ -44,11 +44,6 @@ class Vote(Base): return data - @property - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) - - class CommentVote(Base): __tablename__ = "commentvotes" @@ -86,8 +81,4 @@ class CommentVote(Base): data["user"]=self.user.json_core data["comment"]=self.comment.json_core - return data - - @property - def created_datetime(self): - return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc))) \ No newline at end of file + return data \ No newline at end of file diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index 138a1d85e..364506589 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -49,4 +49,4 @@ - + diff --git a/files/templates/poll_votes.html b/files/templates/poll_votes.html index 54f637709..2da9149eb 100644 --- a/files/templates/poll_votes.html +++ b/files/templates/poll_votes.html @@ -37,7 +37,7 @@ {{vote.user.truecoins}} - {{vote.created_datetime}} + {% endfor %} diff --git a/files/templates/settings_blocks.html b/files/templates/settings_blocks.html index ae344052e..2b74e48f3 100644 --- a/files/templates/settings_blocks.html +++ b/files/templates/settings_blocks.html @@ -50,19 +50,16 @@ User - Blocked since - + Unblock {% for block in v.blocking %} - - - - @{{block.target.username}} - - - {{block.created_date}} + + + + @{{block.target.username}} + - {% else %} + {% else %} There are no blocked users - {% endfor %} + {% endfor %} diff --git a/files/templates/sub/mods.html b/files/templates/sub/mods.html index 765f48426..350979b7c 100644 --- a/files/templates/sub/mods.html +++ b/files/templates/sub/mods.html @@ -19,7 +19,7 @@ {{loop.index}} {{user.username}} - {{mod.created_datetime}} + {% if v.id == user.id or v.mod_date(sub.name) and v.mod_date(sub.name) < mod.created_utc %}
diff --git a/files/templates/submission.html b/files/templates/submission.html index aa575206b..da48eb681 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -70,7 +70,7 @@ {% endif %} {% if p.award_count("firework", v) %} - +
diff --git a/files/templates/userpage.html b/files/templates/userpage.html index e72367b26..7b6b61c32 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -124,10 +124,10 @@ follows {{u.follow_count}} user{{'s' if u.follow_count != 1 else ''}}   - joined {{u.created_date}} + joined {{u.created_date}} {% if v and v.admin_level >= 2 -%} - last active {{u.last_active_date}} + last active {{u.last_active_date}} {%- endif %} {% if u.basedcount %}

Based Count: {{u.basedcount}}

{% endif %} @@ -432,10 +432,10 @@
Based count: {{u.basedcount}} {% endif %} -
joined {{u.created_date}} +
joined {{u.created_date}} {% if v and v.admin_level >= 2 -%} -
last active {{u.last_active_date}} +
last active {{u.last_active_date}} {%- endif %} {% if u.bio_html %} diff --git a/files/templates/util/assetcache.html b/files/templates/util/assetcache.html index e816253a2..55a285079 100644 --- a/files/templates/util/assetcache.html +++ b/files/templates/util/assetcache.html @@ -16,7 +16,7 @@ set CACHE_VER = { 'css/win98.css': 61, 'js/award_modal.js': 253, - 'js/bootstrap.js': 272, + 'js/bootstrap.js': 273, 'js/comments+submission_listing.js': 262, 'js/submission_listing.js': 261, 'js/emoji_modal.js': 297, diff --git a/files/templates/votes.html b/files/templates/votes.html index 8c1a25a8a..af9112f6e 100644 --- a/files/templates/votes.html +++ b/files/templates/votes.html @@ -17,7 +17,7 @@

Info

{{thing.permalink}}

Author: @{{thing.author.username}}

-

Author Created At: {{thing.author.created_datetime}}

+

Author Created At:

Author Truescore: {{thing.author.truecoins}}

Upvotes: {{ups | length}}

Downvotes: {{downs | length}}

@@ -49,7 +49,7 @@ {{vote.user.truecoins}} - {{vote.created_datetime}} + {% endfor %} @@ -77,7 +77,7 @@ {{vote.user.truecoins}} - {{vote.created_datetime}} + {% endfor %}