API

Class-based URL Config

class viewflow.urls.route(prefix, viewset: BaseViewset)

A viewset url

class viewflow.urls.BaseViewset

Base class for defining a class-based Django routing configuration.

Attributes:
app_name (Optional[str]): The name of the application associated with this viewset. namespace (Optional[str]): The namespace for the URLs of this viewset. parent_namespace (Optional[str]): The namespace of the parent viewset. extra_kwargs (Optional[Dict[str, Any]]): Additional keyword arguments for URL configuration.
class viewflow.urls.ViewsetMeta(name, bases, attrs)

Collect urls declared on the based classes.

class viewflow.urls.Viewset(**initkwargs)

Declarative, class-based django routing configuration

An Viewset class automatically collect URL patterns from class attributes with names ends on _url and includes nested Viewset classes from attributes with names ends on ‘_urls’.

Viewset classes could be inherited, extended, and have overridden attributes.

class viewflow.urls.IndexViewMixin

Redirect from / to the first non-parameterized view of the Viewset class.

Frontend Viewset

class viewflow.urls.Site(*, title=None, **kwargs)
class viewflow.urls.Application(**kwargs)
class viewflow.urls.AppMenuMixin(**kwargs)

A route that can be listed in an Application menu.

Frontend CRUD

class viewflow.urls.BaseModelViewset(**kwargs)
class viewflow.urls.ModelViewset(**kwargs)

List/Create/Update/Delete for a model.

class viewflow.urls.ReadonlyModelViewset(**kwargs)

Readonly model viewset with List and object details view only

class viewflow.urls.DeleteViewMixin
class viewflow.urls.DetailViewMixin
class viewflow.views.CreateModelView(**kwargs)
class viewflow.views.DeleteModelView(**kwargs)
class viewflow.views.DetailModelView(**kwargs)
class viewflow.views.ListModelView(**kwargs)

Render some list of objects.

class viewflow.views.UpdateModelView(**kwargs)
class viewflow.views.DeleteBulkActionView(**kwargs)
class viewflow.views.Action(name, url=None, viewname=None, icon=None)

)

Middleware

class viewflow.middleware.SiteMiddleware(get_response)

Set site and app attributes on request.resolver_match object.