0

Strange error, and I don't understand where is the mistake. The traceback shows nothing relevant:

  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

It seems like something is wrong in the urls.py file:

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' )
]
1
  • Would you please provide the entire traceback? Commented Aug 15, 2016 at 23:37

1 Answer 1

3

There's a trailing tuple lurking somewhere between those lines; the url(r'^accounts/register/$'...) line:

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

You intend to have that as a url pattern not a tuple:

url(r'^accounts/', include('registration.urls')),
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.