View¶
- class djmvc.view.ViewMixin[source]¶
-
Base behaviour for every djmvc view: permissions, URLs, Unpoly defaults.
Subclasses and clones inherit
permission_shortcodefrom the class body when set; otherwise it falls back to the viewurlname.- property urlpatterns¶
Single Django URL pattern dispatching to this view class.
- property title¶
Human-readable label with the
Viewsuffix removed.
- property codename¶
URL segment with the
viewsuffix removed from the class name.
- dispatch(request, *args, **kwargs)[source]¶
Redirect anonymous users to login; return 403 when permission denied.
- property permission_shortcode¶
Django permission prefix (
add,change,view, …).
- property permission_codename¶
Permission codename, e.g.
view_document.
- property permission_fullcode¶
Fully qualified permission string, e.g.
myapp.view_document.