Default model permissions in Django

If you have application A and model class B, than your default rights will be A.add_B, A.change_B and A.delete_B. E.g. from views.py:
from apps.donors.models import Vendor, Family, Model, Donor
#...
@permission_required('donors.add_vendor')
def add_vendor(request):
#...
@permission_required('donors.delete_vendor')
def del_vendor(request):
#...
I've lost time, 'cos documentation sucks.

Сторінки

Про цей запис

This page contains a single entry by Микола Стрєбков published on November 14, 2008 1:48 AM.

Скучив. Інструменти. was the previous entry in this blog.

Персональний гімн is the next entry in this blog.

Свіжі записи можна подивитись на головній сторінці. Все інше - в архіві.