I pulled the karma bit of contrib.comments out and made it a more
generic app, so I can use it anywhere. I have it store who voted as
user (as I suspect you would). And at that point all you have to do is
something like:
if KarmaScore.objects.filter(user = request.user):
return HttpResponse("You already voted!", mimetype="text/
html")
Note that in my case I'm actually returning the HttpResponse with
AJAX, so I don't care about building a page. I just want a string in
my response.
On Apr 1, 3:33 pm, "risomt" <[EMAIL PROTECTED]> wrote:
> Just as a quick reply, check out the Comment system in django/contrib:
>
> http://code.djangoproject.com/browser/django/trunk/django/contrib/com...
>
> it has a karma like system and may or may not have unique votes
>
> On Apr 1, 3:08 pm, "SimpleMan" <[EMAIL PROTECTED]> wrote:
>
> > I'm creating something similar to a social poll application. I need
> > the site to remember and prevent users from voting multiple times on
> > each poll, so I figured I would create a new SubmittedPoll model like
> > described in this thread (anonymous users are not a
> > concern):http://groups.google.com/group/django-users/browse_thread/thread/734f...
>
> > In addition, users will be able to "digg" each poll as well as vote on
> > what category it should belong to. All three of these actions is only
> > allowed once per user, and won't necessarily happen simultaneously (or
> > at all). What's the best way to do this? Should I create three
> > separate models to keep track of votes: SubmittedPoll, SubmittedDigg,
> > and SubmittedCategory? Or is there a more efficient way to do this?
>
> > Any advice is appreciated. Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---