.. _urls: URLs ==== Calling `.get_urls()` on a Bread instance returns a urlpatterns list intended to be included in a URLconf. Example usages:: urlpatterns += MyBread().get_urls() or:: urlpatterns = ( ..., path('', include(MyBread().get_urls()), ... ) By default, the patterns returned will be of the form:: Operation Name URL --------- -------------------- -------------------------- Browse browse_ / Read read_ // Edit edit_ //edit/ Add add_ /add/ Delete delete_ //delete/ `name` is the lowercased name of the model. `plural_name` is `name` with an `s` appended, but can be overridden by setting `plural_name` on the Bread view. If a restricted set of views is passed in the 'views' parameter, then only URLs for those views will be included. So, if your bread class looked like:: class MyBread(Bread): model = BasicThingy plural_name = 'basicthingies' Then your URLs returned by `.get_urls()` would look like:: Operation Name URL --------- -------------------- -------------------------- Browse browse_basicthingies basicthingies/ Read read_basicthingy basicthingies// Edit edit_basicthingy basicthingies//edit/ Add add_basicthingy basicthingies/add/ Delete delete_basicthingy basicthingies//delete/ If for some reason you didn't want your URLs to all start with ``/``, then you can pass ``prefix=False`` to ``.get_urls()`` and you'll get back "bare" URLS:: Operation Name URL --------- -------------------- -------------------------- Browse browse_basicthingies Read read_basicthingy / Edit edit_basicthingy /edit/ Add add_basicthingy add/ Delete delete_basicthingy /delete/ Then you'd want to include them into your URLconf with some prefix of your own choosing, e.g.:: urlpatterns = ( .... path('things/', include(MyBread().get_urls(prefix=False)), ... )