Actually, it's correct the way I have it. In this example, a urls directory would be created inside of the pastries app, and an init.py would be created, the contents of which would be:
from django.conf.urls import patterns, include
urlpatterns = patterns('',
(r'^danishes/', include('pastries.urls.danish_urls')), # NOQA
(r'^tarts/', include('pastries.urls.tart_urls')),
)
So if you add (r'^pastries/', include('pastries.urls')), to your URLCONF, it'll create urls to danishes and tarts (ie. example.com/pastries/danishes/create/). The other option is to add each of the above urlpatterns somewhere else if you want a different url schema.
Actually, it's correct the way I have it. In this example, a urls directory would be created inside of the pastries app, and an init.py would be created, the contents of which would be:
So if you add (r'^pastries/', include('pastries.urls')), to your URLCONF, it'll create urls to danishes and tarts (ie. example.com/pastries/danishes/create/). The other option is to add each of the above urlpatterns somewhere else if you want a different url schema.