adminlte2_pdq package

Subpackages

Submodules

adminlte2_pdq.decorators module

Django AdminLTE2 Decorators

adminlte2_pdq.decorators.login_required(function=None, redirect_field_name='next', login_url=None)

Decorator for views that defines that login is required, and also adds the login required as a property to that view function. The property added to the view function can then be used by the sidebar template to know whether to render the sidebar menu item that links to that view function.

adminlte2_pdq.decorators.permission_required(permission, login_url=None, raise_exception=False)

Decorator for views that defines what permissions are required, and also adds the required permissions as a property to that view function. The permissions added to the view function can then be used by the sidebar template to know whether to render the sidebar menu item that links to that view function

adminlte2_pdq.decorators.permission_required_one(permission, login_url=None, raise_exception=False)

Decorator for views that defines that one of the permissions are required, and also adds the required permissions as a property to that view function. The permissions added to the view function can then be used by the sidebar template to know whether to render the sidebar menu item that links to that view function

adminlte2_pdq.mixins module

Django Admin LTE 2 View Mixins

class adminlte2_pdq.mixins.LoginRequiredMixin

Bases: LoginRequiredMixin

Verify that the current user is authenticated.

login_required = True
class adminlte2_pdq.mixins.PermissionRequiredMixin

Bases: PermissionRequiredMixin

Verify that the current user has all or some required permissions.

get_permission_required()

Override this method to override permission attributes. Must return a tuple of two iterables: (perms_all, perms_one)

has_permission()

Check request user has permission

permission_required = None
permission_required_one = None

adminlte2_pdq.views module

Django AdminLTE2 Views

adminlte2_pdq.views.demo_css(request)

Show examples of extra-features.css

adminlte2_pdq.views.home(request)

Show default home page

adminlte2_pdq.views.register(request)

Show default register page

adminlte2_pdq.views.sample1(request)

Show default sample1 page

adminlte2_pdq.views.sample2(request)

Show default sample2 page

adminlte2_pdq.views.sample_form(request)

Show sample form page

adminlte2_pdq.views.view_404(request, exception)

Redirect to home page