fsfsd
This commit is contained in:
parent
3d4d55b4a8
commit
10f7561c60
6 changed files with 14 additions and 14 deletions
|
@ -167,9 +167,9 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
||||||
'is_pinned': self.is_pinned,
|
'is_pinned': self.is_pinned,
|
||||||
'distinguish_level': self.distinguish_level,
|
'distinguish_level': self.distinguish_level,
|
||||||
'post_id': self.post.id,
|
'post_id': self.post.id,
|
||||||
'score': self.score_fuzzed,
|
'score': self.score,
|
||||||
'upvotes': self.upvotes_fuzzed,
|
'upvotes': self.upvotes,
|
||||||
'downvotes': self.downvotes_fuzzed,
|
'downvotes': self.downvotes,
|
||||||
#'award_count': self.award_count,
|
#'award_count': self.award_count,
|
||||||
'is_bot': self.is_bot,
|
'is_bot': self.is_bot,
|
||||||
'flags': flags,
|
'flags': flags,
|
||||||
|
|
|
@ -126,7 +126,7 @@ class Scores:
|
||||||
class Fuzzing:
|
class Fuzzing:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def score_fuzzed(self):
|
def score(self):
|
||||||
|
|
||||||
real = self.score
|
real = self.score
|
||||||
real = int(real)
|
real = int(real)
|
||||||
|
@ -140,7 +140,7 @@ class Fuzzing:
|
||||||
return random.randint(a, b)
|
return random.randint(a, b)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def upvotes_fuzzed(self):
|
def upvotes(self):
|
||||||
|
|
||||||
if self.upvotes <= 10: return self.upvotes
|
if self.upvotes <= 10: return self.upvotes
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ class Fuzzing:
|
||||||
return random.randint(lower, upper)
|
return random.randint(lower, upper)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def downvotes_fuzzed(self):
|
def downvotes(self):
|
||||||
if self.downvotes <= 10: return self.downvotes
|
if self.downvotes <= 10: return self.downvotes
|
||||||
|
|
||||||
lower = int(self.downvotes * 0.99)
|
lower = int(self.downvotes * 0.99)
|
||||||
|
|
|
@ -222,9 +222,9 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
||||||
'created_utc': self.created_utc,
|
'created_utc': self.created_utc,
|
||||||
'edited_utc': self.edited_utc or 0,
|
'edited_utc': self.edited_utc or 0,
|
||||||
'comment_count': self.comment_count,
|
'comment_count': self.comment_count,
|
||||||
'score': self.score_fuzzed,
|
'score': self.score,
|
||||||
'upvotes': self.upvotes_fuzzed,
|
'upvotes': self.upvotes,
|
||||||
'downvotes': self.downvotes_fuzzed,
|
'downvotes': self.downvotes,
|
||||||
'stickied': self.stickied,
|
'stickied': self.stickied,
|
||||||
'distinguish_level': self.distinguish_level,
|
'distinguish_level': self.distinguish_level,
|
||||||
#'award_count': self.award_count,
|
#'award_count': self.award_count,
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% set title=p.realtitle(v) %}
|
{% set title=p.realtitle(v) %}
|
||||||
{% set ups=p.upvotes_fuzzed %}
|
{% set ups=p.upvotes %}
|
||||||
{% set downs=p.downvotes_fuzzed %}
|
{% set downs=p.downvotes %}
|
||||||
{% set score=ups-downs %}
|
{% set score=ups-downs %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends "submission.html" %}
|
{% extends "submission.html" %}
|
||||||
|
|
||||||
{% set score=p.score_fuzzed %}
|
{% set score=p.score %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
{% set voted=p.voted %}
|
{% set voted=p.voted %}
|
||||||
{% set adjust=voted %}
|
{% set adjust=voted %}
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% set ups=p.upvotes_fuzzed %}
|
{% set ups=p.upvotes %}
|
||||||
{% set downs=p.downvotes_fuzzed %}
|
{% set downs=p.downvotes %}
|
||||||
{% set score=ups-downs %}
|
{% set score=ups-downs %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue