Also: update to Django 1.6.
-i http://pypi.nowoczesnapolska.org.pl/simple
-i http://pypi.nowoczesnapolska.org.pl/simple
--e git+https://github.com/rczajka/django-cas-provider.git@bb0f7662eb12a838cbd339dd8b60476a73ec161b#egg=django-cas-provider
+-e git+https://github.com/rczajka/django-cas-provider.git@1d2632a20124e8d08a234486e3c2da81b23d5734#egg=django-cas-provider
from django.db import models
from django.db import models
+from cas_provider.signals import cas_collect_custom_attributes
class Service(models.Model):
class Service(models.Model):
class Meta:
ordering = ('ordering', )
class Meta:
ordering = ('ordering', )
+
+
+def user_attributes(sender, user, **kwargs):
+ return {
+ 'firstname': user.first_name,
+ 'lastname': user.last_name,
+ 'email': user.email,
+ }
+cas_collect_custom_attributes.connect(user_attributes)
{% block content %}
<aside class="user_avatar">
{% block content %}
<aside class="user_avatar">
- <img src="{% gravatar_for_email request.user.email 120 %}"
+ <img src="{% gravatar_url request.user.email 120 %}"
alt="Gravatar"
title="{% trans 'Change at Gravatar.com' %}">
<p><a href="{% url 'cas_provider.views.logout' %}">{% trans "Logout" %}</a></p>
alt="Gravatar"
title="{% trans 'Change at Gravatar.com' %}">
<p><a href="{% url 'cas_provider.views.logout' %}">{% trans "Logout" %}</a></p>
'django.contrib.staticfiles',
'cas_provider',
'django.contrib.staticfiles',
'cas_provider',