on each poll add something like
     user  = models.ForeignKey(User,  null=True, blank=True)

in the update/create views add something like


     if request.user.is_anonymous():
         return redirect_to_login(request.path)

     try:
         poll = Poll.objects.get( id= id )
     except Company.DoesNotExist:
         raise Http404("I can't find that poll: %d" % id )

     if request.user != poll.user and not request.user.is_staff:
         return HttpResponseForbidden("only the person who created  
the Poll can edit it");

  # then call the generic one
     return update_object(request, Poll, id,
                   template_name=template_name,  
template_loader=template_loader,
                   extra_lookup_kwargs= extra_lookup_kwargs,  
extra_context=extra_context, post_save_redirect=post_save_redirect,
                   login_required=login_required, follow=follow)


On 18/06/2006, at 2:40 PM, djx wrote:

>
> Hi, wishing to confirm if anyone has managed to do something similar.
>
> Using terms from the tutorial at www.djangoproject.com, i wish to
>
> - allow users (possibly upto 70 users) to create their own
> Polls/choices
> - but not (at least not easily) alter the Polls/choices that other
> users have created
>
> What's the django way to do it?  Any ideas appreciated.
>
> Many thanks.
> D.
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to