Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8881907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:26:42+00:00 2026-06-14T20:26:42+00:00

I made this many times and it worked, but not this time. I get

  • 0

I made this many times and it worked, but not this time.

I get this error when I try to use {% url path.to.view %} django’s template tage:

AttributeError at /login/ ‘str’ object has no attribute ‘regex’


urls.py (main)

urlpatterns= patterns('', (r'', include('authenticate.urls')),  )

urls.py (my app)

urlpatterns= patterns('authenticate.views', url(r'^login/$','login'),)

login.html

{{ form }}
{% url authenticate.views.login %} < --- Error comes here

in the views:

return render_to_response('login.html',{'form':form},context_instance=RequestContext(request),  )

Doesn’t also work with:

 {% url authenticate.views.login %}
 {% url 'authenticate.views.login' %}
 {% url "authenticate.views.login" %}

This is on django 1.4; what possibly I’m doing wrong, or what do I miss in that version of django?

Thanks in Advance!


Update:

I can also add that using reverse in my views doesn’t work and gives me the same error above:

from django.core.urlresolvers import reverse

result = reverse('django.contrib.auth.views.password_reset')         
HttpResponse(result)

Error:

AttributeError at /abc/ ‘str’ object has no attribute ‘regex’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:26:43+00:00Added an answer on June 14, 2026 at 8:26 pm

    I got it :))

    The problem wasn’t in the url template tag, it was in another urls file that’s been included in the main one; the problem doesn’t show till my app. hits url template tage or django’s reverse method, otherwise, django doesn’t complain about any url!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This was asked many times, I know but this is different! I made this:
I am a little forgetful have made it many times and can not find
Hello Everyone, I have made so many Flash presentations, but every time i stuck
I call the same controller many times from _Layout.cshtml view. So in this controller,
I made this bash one-liner which I use to list Weblogic instances running along
I have used the Attach to process function within VS 2008 many times, but
I know this question has been asked many times and the answer is always
I'm not including any code here because I've re-written it so many times over
Made this nice little loop for hiding and showing div's, works as a charm
I made this function to verify a user's twitter credentials. Its running on two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.