django_adminlte_2 package

Subpackages

Submodules

django_adminlte_2.decorators module

Django AdminLTE2 Decorators

django_adminlte_2.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.

django_adminlte_2.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

django_adminlte_2.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

django_adminlte_2.mixins module

Django Admin LTE 2 View Mixins

class django_adminlte_2.mixins.LoginRequiredMixin

Bases: LoginRequiredMixin

Verify that the current user is authenticated.

login_required = True
class django_adminlte_2.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

django_adminlte_2.views module

Django AdminLTE2 Views

django_adminlte_2.views.demo_css(request)

Show examples of extra-features.css

django_adminlte_2.views.home(request)

Show default home page

django_adminlte_2.views.register(request)

Show default register page

django_adminlte_2.views.sample1(request)

Show default sample1 page

django_adminlte_2.views.sample2(request)

Show default sample2 page

django_adminlte_2.views.sample_form(request)

Show sample form page

django_adminlte_2.views.view_404(request, exception)

Redirect to home page