Reputation: 4862
my url.py
from django.conf.urls import patterns, include, url
import os.path
from crm.views import *
(r'^workDailyRecord/(?P<mode_name>\w+/)?$', workDailyRecord),
(r'^user/search/$', searchUser),
# (r'^tset/$', mainPage),
# (r'^ptpt/$', mainPage),
(r'^tptp/$', TodayLogView.as_view(), name='archive_today'), #34 Line
)
Why? I recive that?? Why? Please help me!
Upvotes: 0
Views: 769
Reputation: 27861
You have to use url
in this order of parameters:
...
url(r'^tptp/$', TodayLogView.as_view(), name='archive_today'),
...
Excerpt from the docs:
You can use the url() function, instead of a tuple, as an argument to patterns(). This is convenient if you want to specify a name without the optional extra arguments dictionary.
Upvotes: 3