Triple quote strings in URL patterns produce error
A quick reminder, that drives me crazy sometimes.
This is a stupid protip but may help somebody to resolve the annoying 'str' object has no attribute 'regex'
error.
urlpatterns = patterns('',
url(
r'^$',
views.dashboard,
name='admin-dashboard'
),
url(
r'^business/$',
views.business_list,
name='admin-business'
),
"""
url(
r'^business/$',
views.business_list,
name='admin-business'
),
"""
)
Written by Leandro Ardissone
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Related Tags
#django
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#