Question

I have recently downgraded my Django project from 1.5 to 1.4 in order to host my project on an OpenShift server. In the process, I appear to have created a problem for reverse lookups from the django-registration app.

Specifically, when I POST data to /accounts/register/ (the form that registers a new user), I receive a 500 error, with no email being sent to the user to confirm their account. However, the user is added as an inactive user to the auth_users table, and the new key is added to the registration table, which is odd.

I have looked all over the Internet for an answer to this issue, but whatever I try, it does not resolve the issue. My traceback appears as such:

Internal Server Error: /accounts/register/

...

File "/var/lib/openshift/526304/python/virtenv/lib/python2.6/site-packages/Django-1.4-py2.6.egg/django/template/base.py", line 837, in render_node
    return node.render(context)

File "/var/lib/openshift/526304/python/virtenv/lib/python2.6/site-packages/Django-1.4-py2.6.egg/django/template/defaulttags.py", line 424, in render
    raise e

NoReverseMatch: Reverse for '"registration_activate"' with arguments '('0747dcf8831ac8d54ca69348bc499a2cc549a9ea',)' and keyword arguments '{}' not found.

Thank you for any and all help

Was it helpful?

Solution

From release notes of django-1.5

The upshot of this is that if you are not using {% load url from future %} in your templates, you’ll need to change tags like {% url myview %} to {% url "myview" %}. If you were using {% load url from future %} you can simply remove that line under Django 1.5

Which means, during downgrade,

{% url "myview" %}

should be

{% url myview %} 

which is the cause of the error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top