Package: django-fastview
Flexible view system to help you build views quickly.Fastview slashes development time for modern hybrid frontends - build comprehensive yet
customisable CRUD views in a couple of lines, with built-in HTMX support.Create a view group to manage models - list, read, create, update and delete viewsAll views are class-based, so they’re quick and easy to customiseDefault templates are designed to be customised or replaced to fit your designAdvanced permission system allows fine-grained row-level access controlBuilt-in support for HTMX (coming soon), inline model formsets and moreNote: this is an alpha release; expect feature and API changes in future versions. Check
upgrade notes for instructions when upgrading.Project site:https://radiac.net/projects/django-fastview/Documentation:https://django-fastview.readthedocs.io/Source code:https://github.com/radiac/django-fastviewRequires Python 3.7 or later and Django 2.2 or laterExampleLets write a wiki where anyone can view, add, edit and delete pages:# urls.py (for example purposes - normally define the viewgroup in app/views.py)fromfastview.viewgroupsimportModelViewGroupfromfastview.permissionsimportPublicfrommywiki.modelsimportWikiclassWikiViewGroup(ModelViewGroup):model=Wikipermission=Public()urlpatterns=[url(r'^wiki/',WikiViewGroup().include(namespace="wiki")),]This will create a functioning set of list, detail, create, update and delete views
under the/wiki/path on your site.There are all sorts of things you can do from here:The views are all based on Django’s generic class-based views, so they’re easy to customiseEasy and flexible permissions to control who can do whatSee theTutorialin the documentation for more details.QuickstartInstall using pip:pip install django-fastviewAdd toINSTALLED_APPS:INSTALLED_APPS = [
    ...
    "fastview",
]Optional: add the default JavaScript and CSS to your templates or frontend build
process.SeeGetting Startedin the documentation for more details.Advanced exampleBuild a more complex view group with custom view classes and complex access controls:# urls.py (for example purposes)fromfastview.viewgroupsimportModelViewGroupfromfastview.permissionsimportPublic,Login,Staff,Owner,Djangofrommyblog.modelsimportBlogfrommyblog.viewsimportBlogUpdateView,BlogPublishViewclassBlogViewGroup(ModelViewGroup):model=Blog# Default permission for views - any views without explicit permissions will# require that user is logged inpermission=Login()# Make the list view public by reconfiguring it with a call to View.config()list_view=fastview.views.generics.ListView.config(permission=Public(),)# Make the detail view public by reconfiguring it with the dict shorthand formatdetail_view=dict(permission=Public(),)# Override update with a custom view, and limit access to staff or post ownersupdate_view=BlogUpdateView.config(permission=Staff()|Owner("owner"),)# Use the Django permission framework to manage who can delete Blog objectsdelete_view=dict(permission=Django("delete"),)# Add a publish view where only staff can access, but only if it's not their ownpublish_view=BlogPublishView.config(permission=Staff()&~Owner("owner"),)urlpatterns=[url(r'^blog/',BlogViewGroup().include(namespace="blog")),]You may then want to create a custom templates attemplates/myblog/blog/list.htmlandtemplates/myblog/blog/detail.htmlto change the way blog posts are rendered.For more details see themain documentation.More examplesSee Examples in the documentation for more details on these two examples, as well as how
you can use fastview to:configure and customise the viewsuse permissions to control access to individual database objectsadd inline models to your formsand more