Skip to main content

Django admin like groups of CBVs

Project description

# Getting Started

Import ViewSet to make a basic set of views for a particular model

from viewsets import ViewSet

pizza_viewset = ViewSet()

Viewsets come with these basic views: list, create, detail, update, and delete

You can then import those views into your urls file easy. The following code will install all of your viewsets at the default location.

urlpatterns = ViewSet.all_urls()

Import ViewSetMixin to use mixin with views that you are overriding

from viewsets import ViewSet, ViewSetMixin

Override default views or create your own with the viewset manager.

@pizza_viewset.register("create")
class ToppingCreateView(ViewSetMixin, CreateView):
    ....

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-viewgroups-0.0.13.tar.gz (12.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page