Generic non-model related admin views for Django.
Define admin views for Django admin not tied to a ModelAdmin.
Supports: Python 3.10.
Supports Django Versions: 4.2.9
$ pip install django-staff-view
Add staff_views
to INSTALLED_APPS
.
Import the view class from the package, and subclass it like this:
from django import forms
from staff_view.views import StaffView
class MyForm(forms.Form):
text = forms.CharField()
class MyView(StaffView):
form_class = MyForm
def form_valid(self, form):
... # Return a response object