Sorry about the double e-mail, not sure what happened there.

I ended up fixing the issue myself; I wasn't fully understanding the structure 
of patterns() in urls.py.

I moved the 'SSL': True into the other dictionary so the line now looks like:

(r'^login/', 'django.contrib.auth.views.login', {'template_name': 'reg\
istration/login.html', 'SSL' : True}),

________________________________________
From: django-users@googlegroups.com [django-us...@googlegroups.com] On Behalf 
Of Colleen A Josephson [cjos...@mit.edu]
Sent: Monday, July 26, 2010 2:35 PM
To: django-users@googlegroups.com
Subject: Caught TypeError while rendering: unhashable type: 'dict'

I'm trying to use the SSLMiddleware.

I have a login page whose urlconf is:
(r'^login/', 'django.contrib.auth.views.login', {'template_name': 'reg\
istration/login.html'}, {'SSL' : True}),

When I go to that page, I get the error: TemplateSyntaxError at /login/

Caught TypeError while rendering: unhashable type: 'dict'

and it points to line 9 of my login.html template
1       {% extends "base.html" %}
2
3       {% block content %}
4
5       {% if form.errors %}
6       <p>Your username and password didn't match. Please try again.</p>
7       {% endif %}
8
9       <form method="post" action="{% url django.contrib.auth.views.login 
%}">{% csrf_token %}
10      <table>
11      <tr>
12      <td>{{ form.username.label_tag }}</td>
13      <td>{{ form.username }}</td>
14      </tr>
15      <tr>
16      <td>{{ form.password.label_tag }}</td>
17      <td>{{ form.password }}</td>
18      </tr>
19      </table>

If I omit the {'SSL' : True} option in urls.py, the page loads fine.

Any help is greatly appreciated.

-Colleen

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to