Thursday, July 30, 2015

Restricting CreateView

Hi

Using other CBV's I can use get_queryset to filter out users that don't belong to a certain group. AFAIK createview doesn't have get_queryset.

Can I achieve this with CreateView somehow?

The context is:

All forums: have to be a member of X to view anything
A particular Forum: have to be a member of Y to view at all
CreateView need to be a member of Y to view/submit

Thank you

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/49fb6fc3-7b86-424c-af97-d50824762dd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment