2016-08-15 10 views
0

奇妙なエラーです。間違いがどこにあるのか分かりません。それは何かのように思えるAttributeError: 'tuple'オブジェクトに 'regex'属性がありません

File "/home/popovvasile/work/intiativa_new/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 27, in check_resolver 
    warnings.extend(check_pattern_startswith_slash(pattern)) 
    File "/home/popovvasile/work/intiativa_new/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 63, in check_pattern_startswith_slash 
    regex_pattern = pattern.regex.pattern 

はurls.pyファイルに間違っている:トレースバックは、関連する何も示していない

urlpatterns = [ 
    # Examples: 
    url(r'^$', 'newsletter.views.home', name='home'), 
    url(r'^contact/$', 'newsletter.views.contact', name='contact'), 
    url(r'^about/$', About.as_view(), name='about'), 
    # url(r'^blog/', include('blog.urls')), 

    url(r'^noway/', include(admin.site.urls)), 



    url(r'^petitions/', include('newsletter.petitions_urls', namespace="petitions")), 
    url(r'^laws/', include('newsletter.laws_urls', namespace="laws")), 


    url(r'^accounts/register/$', RegistrationView.register, {'backend': 'registration.backends.default.DefaultBackend','form_class': UserRegForm}, name='registration_register'),(r'^accounts/', include('registration.urls')), 
    url(r'^news/', include('newsletter.news_urls', namespace="news")), 
    url(r'^petition-thanks/$', PetitionThanksView.as_view(), name='thanks_petitions'), 
    url(r'^addpetitions/$', create_new_petition, name='add_petitions'), 
    url(r'^comments/', include('fluent_comments.urls')), 

    # url(r'^comments/posted/$', 'newsletter.views.comment_posted') 
] 
+0

あなたは*全体*トレースバックを提供していただけますか? – zondo

答えて

2

これらの線の間のどこかに潜んでいる末尾のタプルがありますが、 url(r'^accounts/register/$'...)ライン:

(r'^accounts/', include('registration.urls')) 

あなたはURLパターンではないタプルとすることを持っているつもり:

url(r'^accounts/', include('registration.urls')), 
関連する問題