I know, this is actually basics of django BUT
I tried to split my huge urls.py into 3 pieces. All 3 urls_xxx.py live under one folder: mysite
.
then in main urls.py i did:
#urls.py
urlpatterns += patterns('',
url(r'^', include('urls_search')),
url(r'^', include('urls_ajax')),
url(r'^', include('urls_sitemaps')),
)
but it is saying:
ImportError at /
No module named urls_search
this is urls_search.py:
urlpatterns = patterns('myapp.views',
url(r'^advancedsearch/$', 'advsearch', name="advsearch"),
url(r'^advancedsearch/tc/$', 'advtcsearch', name="advtcsearch"),
)
my URLCONF:
ROOT_URLCONF = 'mysite.urls'
what am I doing wrong? I am using Django 1.4
remove .py
like this:
url(r'^', include('mysite.urls_search')),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With