class based view example in django

url.py
======
url(r'^organization/(?P<organization_id>(\w{0}|\w{10}))/license/allocate/$', MapLicenses.as_view(), name='map_licenses'),

xyz.py
======
class MapLicenses(View):
    @method_decorator(check_user_allowed(allowed_user_types_list=[SUPER_ADMIN_KEY, ADMIN_KEY], need_org_check=True))
    def get(self, request, organization_id):
           -----
    some contain
    -----
        return render(request, 'iadmin/map_license.html', params)

No comments:

Post a Comment