ModelRouter and site¶
- class djcrud.ModelRouter[source]¶
Bases:
ModelMixin,RouterCRUD router for a single Django model.
- routes¶
Default list, detail, create, update, delete, and bulk-delete views. Extend with
ModelRouter.routes + [MyView]or replace entries by codename (seeRegistry).
- model¶
Django model class managed by this router.
- class djcrud.Site[source]¶
Bases:
RouterRoot site router; autodiscovers
djcrud.pyin installed apps.
- class djcrud.Home(**kwargs)[source]¶
Bases:
TemplateViewSite root page at
/.Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- djcrud.site¶
Root
Siteinstance. Beforebuild(),site.routesis the declaration list — append routers from each app’sdjcrud.pywithsite.routes.append(...)(see Routing). Calldjcrud.site.build()from your project’surls.pyto autodiscover those modules and obtainurlpatterns.After build, inspect the URL tree with
python manage.py show_urls(see Routing).