You can use decorator before start of view:No need to write different view for user and admin.@login_required(redirect_field_name='next', login_url=None)
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/aefcd717-2619-4f21-9357-70d7fb3b7d97%40googlegroups.com.