601: Login page broken when BUILTIN_AUTH=False (r1447)

ako****@gmai***** (Google Code) (Is this you? Claim this profile.)
Aug. 27, 2008
What's the URL of the page containing the problem?
(behind a firewall)
reviewboard/templates/accounts/login.html

What steps will reproduce the problem?
1. Standard install
2. BUILTIN_AUTH=False with associated values of
BUILTIN_AUTH = False
AUTHENTICATION_BACKENDS = (
    'reviewboard.accounts.backends.NISBackend',
    'django.contrib.auth.backends.ModelBackend'
)
NIS_EMAIL_DOMAIN = 'example.com'
3. To to reviewboard url login page to login

What is the expected output? What do you see instead?
see login.html.badpage attached
should see login page

What operating system are you using? What browser?
$ uname -a
Linux reviewboard 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 12 17:59:08 EDT 2007
i686 GNU/Linux


Please provide any additional information below.
{% extends "base.html" %}
{% load djblets_deco %}
{% load djblets_utils %}
{% load i18n %}
{% block title %}{% trans "Log in" %}{% endblock %}
{% block content %}
{% box "important" %}
{% if BUILTIN_AUTH %}
<h1>{% trans "New user?" %}</h1>
 <p>
 {% definevar "register_url" %}{% url register %}{% enddefinevar %}
 {% blocktrans %}If you don't yet have an account, you'll need to <a href="{{register_url}}">register</a> one. It will only take a minute.{% endblocktrans %}
 </p>
{% else %}
<h1>{% trans "Log in with your standard username and password" %}</h1>
 <p>
 {% blocktrans %}There's no need to register a new account. Your standard username and password should work fine.{% endblocktrans %}
 </p>
{% endif %}
{% endbox %}
{% box "loginform" %}
<form method="post" action=".">
 <h1 class="title">{% trans "Log In" %}</h1>
 <div class="main">
 {% if error %}
 {%  errorbox %}
 {{ error }}
 {%  enderrorbox %}
 {% endif %}
 <input type="hidden" name="next_page" value="{{next_page}}"></input>
 
TemplateSyntaxError at /account/login/
Caught an exception while rendering: Reverse for 'settings.register' not found. Original Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/template/debug.py", line 71, in render_node result = node.render(context) File "/usr/lib/python2.5/site-packages/django/template/defaulttags.py", line 369, in render args=args, kwargs=kwargs) File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py", line 307, in reverse *args, **kwargs))) File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py", line 291, in reverse raise NoReverseMatch("Reverse for '%s' not found." % lookup_view) NoReverseMatch: Reverse for 'settings.register' not found.
Request Method: 	GET
Request URL: 	http://reviewboard.efi.com/account/login/
Exception Type: 	TemplateSyntaxError
Exception Value: 	Caught an exception while rendering: Reverse for 'settings.register' not found. Original Traceback (most recent call last): File "/usr/lib/pyt
Index: login.html
===================================================================
--- login.html	(revision 1447)
+++ login.html	(working copy)
@@ -6,11 +6,11 @@
 {% block title %}{% trans "Log in" %}{% endblock %}
 
 {% block content %}
-{% definevar "register_url" %}{% url register %}{% enddefinevar %}
 {% box "important" %}
 {% if BUILTIN_AUTH %}
 <h1>{% trans "New user?" %}</h1>
  <p>
+ {% definevar "register_url" %}{% url register %}{% enddefinevar %}
  {% blocktrans %}If you don't yet have an account, you'll need to <a href="{{register_url}}">register</a> one. It will only take a minute.{% endblocktrans %}
  </p>
 {% else %}
#1 ako****@gmai***** (Google Code) (Is this you? Claim this profile.)
sorry about the lame extensions that don't allow easy viewing of the files :P
#2 terry.*******@gmai***** (Google Code) (Is this you? Claim this profile.)
same issue when i am using the ldap mods. thanks for the patch.
david
#3 david
Fixed in SVN r1458. Thanks!
  • +Fixed