fnp
/
cas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b48e5fd
)
random fixes
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 14 Jan 2013 12:07:43 +0000
(13:07 +0100)
committer
Central Auth Service
<cas@szo.nowoczesnapolska.org.pl>
Mon, 14 Jan 2013 12:07:43 +0000
(13:07 +0100)
provider/cas_provider/templates/cas/login.html
patch
|
blob
|
history
provider/cas_provider/urls.py
patch
|
blob
|
history
provider/cas_provider/views.py
patch
|
blob
|
history
src/accounts/templatetags/gravatar.py
patch
|
blob
|
history
src/cas/templates/cas/login.html
patch
|
blob
|
history
diff --git
a/provider/cas_provider/templates/cas/login.html
b/provider/cas_provider/templates/cas/login.html
index
d61974a
..
42b5708
100644
(file)
--- a/
provider/cas_provider/templates/cas/login.html
+++ b/
provider/cas_provider/templates/cas/login.html
@@
-5,7
+5,7
@@
Login
{% endblock %}
{% block content %}
{% endblock %}
{% block content %}
- <form action='
.
' method='post'>
+ <form action='
{% url login %}
' method='post'>
<fieldset>
<legend>Log in to your account</legend>
{% if errors %}
<fieldset>
<legend>Log in to your account</legend>
{% if errors %}
diff --git
a/provider/cas_provider/urls.py
b/provider/cas_provider/urls.py
index
2bdbe79
..
2b53f31
100644
(file)
--- a/
provider/cas_provider/urls.py
+++ b/
provider/cas_provider/urls.py
@@
-3,8
+3,8
@@
from django.conf.urls.defaults import *
from cas_provider.views import *
urlpatterns = patterns('',
from cas_provider.views import *
urlpatterns = patterns('',
- url(r'^login/$', login),
- url(r'^validate/$', validate),
- url(r'^serviceValidate/$', service_validate),
- url(r'^logout/$', logout),
-)
\ No newline at end of file
+ url(r'^login/?$', login, name='cas_login'),
+ url(r'^validate/?$', validate),
+ url(r'^serviceValidate/?$', service_validate),
+ url(r'^logout/?$', logout),
+)
diff --git
a/provider/cas_provider/views.py
b/provider/cas_provider/views.py
index
e2466b8
..
3a9ab5a
100644
(file)
--- a/
provider/cas_provider/views.py
+++ b/
provider/cas_provider/views.py
@@
-4,6
+4,7
@@
from django.template import RequestContext
from django.contrib.auth.models import User
from django.contrib.auth import authenticate
from django.contrib.auth import login as auth_login, logout as auth_logout
from django.contrib.auth.models import User
from django.contrib.auth import authenticate
from django.contrib.auth import login as auth_login, logout as auth_logout
+from django.utils.encoding import smart_str
from django.utils.translation import ugettext_lazy as _
from cas_provider.forms import LoginForm
from django.utils.translation import ugettext_lazy as _
from cas_provider.forms import LoginForm
@@
-24,7
+25,7
@@
__all__ = ['login', 'validate', 'service_validate', 'logout']
def _add_query_param(url, param, value):
parsed = urlparse.urlparse(url)
def _add_query_param(url, param, value):
parsed = urlparse.urlparse(url)
- query = url_parse_qs(
parsed.query
)
+ query = url_parse_qs(
smart_str(parsed.query)
)
query[param] = [unicode(value, 'utf-8')]
query = [ ((k, v) if len(v) != 1 else (k, v[0])) for k, v in query.iteritems() ]
parsed = urlparse.ParseResult(parsed.scheme, parsed.netloc,
query[param] = [unicode(value, 'utf-8')]
query = [ ((k, v) if len(v) != 1 else (k, v[0])) for k, v in query.iteritems() ]
parsed = urlparse.ParseResult(parsed.scheme, parsed.netloc,
diff --git
a/src/accounts/templatetags/gravatar.py
b/src/accounts/templatetags/gravatar.py
index
93a1ebf
..
789534f
100644
(file)
--- a/
src/accounts/templatetags/gravatar.py
+++ b/
src/accounts/templatetags/gravatar.py
@@
-19,7
+19,7
@@
class GravatarNode(template.Node):
except template.VariableDoesNotExist:
return ''
except template.VariableDoesNotExist:
return ''
- gravatar_url = "http://www.gravatar.com/avatar/" + hashlib.md5(email).hexdigest() + "?"
+ gravatar_url = "http
s
://www.gravatar.com/avatar/" + hashlib.md5(email).hexdigest() + "?"
gravatar_url += urllib.urlencode({'default': 'mm', 'size': str(self.size)})
return gravatar_url
gravatar_url += urllib.urlencode({'default': 'mm', 'size': str(self.size)})
return gravatar_url
diff --git
a/src/cas/templates/cas/login.html
b/src/cas/templates/cas/login.html
index
7a51cac
..
514c5a3
100644
(file)
--- a/
src/cas/templates/cas/login.html
+++ b/
src/cas/templates/cas/login.html
@@
-3,7
+3,7
@@
{% block content %}
{% block content %}
- <form action='
.
' method='post'>
+ <form action='
{% url cas_login %}
' method='post'>
<h1>{% trans "Login" %}</h1>
{% for error in errors %}
<h1>{% trans "Login" %}</h1>
{% for error in errors %}