david / django-modelviews

Backup of an old repository with useful ideas. Initial goal: integrating REST to django admin (class-based views).

Clone this repository (size: 85.7 KB): HTTPS / SSH
$ hg clone http://code.welldev.org/django-modelviews
django-modelviews / generic / authentications.py
r46:ce94cd50e1ba 9 loc 270 bytes embed / history / annotate / raw /
1
2
3
4
5
6
7
8
def django_authentication(request, **kwargs):
    return request.user.is_authenticated()

def django_superuser_authentication(request, **kwargs):
    return request.user.is_superuser

def django_staff_authentication(request, **kwargs):
    return request.user.is_staff