0

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!

2

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.