Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Fix bug 904281: Add more ways to see stats about votes to the admin. #257

Merged
merged 1 commit into from Aug 14, 2013

Conversation

Osmose
Copy link
Contributor

@Osmose Osmose commented Aug 13, 2013

Adds a few niceties to the admin interface to make it easier to find
information about how many votes there are, who has voted, what they
have voted on, etc.

There's no tests because admin stuff is in general hard to test and
the set of users for this stuff is small and limited to trusted
individuals. The only testable thing here is the admin filter, but it's
trivial and doesn't handle any edge cases.

Adds a few niceties to the admin interface to make it easier to find
information about how many votes there are, who has voted, what they
have voted on, etc.

There's no tests because admin stuff is in general hard to test and
the set of users for this stuff is small and limited to trusted 
individuals. The only testable thing here is the admin filter, but it's
trivial and doesn't handle any edge cases.
@@ -148,6 +148,8 @@ class Vote(models.Model, CachingMixin):
user = models.ForeignKey(User)
video = models.ForeignKey(Video2013)

created = models.DateTimeField(default=datetime.now)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not using TZ aware datetimes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. Completely forgot. Doh!

@pmclanahan
Copy link

It's mostly admin wizardry, which I'm assuming you've tested locally and work the way you want. I've not done that, but the code and style look good. I didn't check the rest of the app, but I guess you're not using the timezone stuff and storing UTC datetimes at present. That'd be good to do in future, but if you're not doing it now probably best for next year. If you are doing it, then you should use the more appropriate method for the default in the created field.

Unless there's work for the timezone stuff, it's an r+ from me.

@Osmose Osmose merged commit cf4d4c2 into mozilla:master Aug 14, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants