Affichage des attributs

XXX Modification css de gadjo
This commit is contained in:
Paul Marillonnet 2017-02-16 19:04:05 +01:00
parent 26dc8936b6
commit 043672143a
6 changed files with 25 additions and 7 deletions

View File

@ -82,9 +82,22 @@ def index(request):
#return HttpResponse(str(loggedin))
#loggedin = UserSAMLIdentifier.objects.last().user
#loggedin = UserSAMLIdentifier.objects.last().user.username
loggedin = str(UserSAMLIdentifier.objects.last().user.username)
return render(request, 'logged.html', {'loggedin' : loggedin})
#return HttpResponse(str(loggedin))
#loggedin = str(UserSAMLIdentifier.objects.last().user.username)
#loggedin = getmembers(UserSAMLIdentifier.objects.last().user)
#return render(request, 'logged.html', {'loggedin' : loggedin})
#return HttpResponse(str(settings.MELLON_ATTRIBUTE_MAPPING.keys()))
#return HttpResponse(loggedin)
loggedin = {}
workaround = " "
#keys = settings.MELLON_ATTRIBUTE_MAPPING.keys()
loggedin['first_name'] = UserSAMLIdentifier.objects.last().user.first_name
loggedin['last_name'] = UserSAMLIdentifier.objects.last().user.last_name
loggedin['email'] = UserSAMLIdentifier.objects.last().user.email
loggedin['password'] = UserSAMLIdentifier.objects.last().user.password
return render(request, 'logged.html', {'loggedin' : loggedin, 'workaround' : workaround})
#return HttpResponse(str(dict))
def ParseSAML(saml_assert):
# XML namespaces defined in the sample SAML assertion:

View File

@ -120,3 +120,4 @@ USE_TZ = True
# https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')

View File

@ -3,8 +3,7 @@ div#meta {
}
div#sidebar {
width: 20em;
float: left;
display: None;
}
div#page-content {

View File

@ -2,5 +2,7 @@
{% block content %}
{% csrf_token %}
{{ loggedin }}
{% for l, u in loggedin.items %}
{{ workaround }} {{ l }} : {{ u }} <br>
{% endfor %}
{% endblock %}

View File

@ -2,7 +2,7 @@
{% load staticfiles i18n %}
{% block css %}
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/sp_sso.manager.css"/>
<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/sp_sso.manager.css' %}"/>
{% endblock %}
{% block page-title %}{% firstof site_title "SP SSO" %}{% endblock %}
{% block site-title %}{% firstof site_title "SP SSO" %}{% endblock %}
@ -13,12 +13,14 @@
{% url 'sp_sso-manager-homepage' as default_homepage_url %}
{% firstof manager_homepage_url default_homepage_url %}
{% endblock %}
{% endcomment %}
{% block homepage-title %}
{% trans 'Portal' as default_homepage_title %}
{% firstof manager_homepage_title default_homepage_title %}
{% endblock %}
{% comment "pas necessaire pour l'instant" %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'sp_sso-manager-homepage' %}">{% trans 'Portal Management' %}</a>

View File

@ -0,0 +1 @@
('DoesNotExist', )('Meta', )('MultipleObjectsReturned', )('REQUIRED_FIELDS', [u'email'])('USERNAME_FIELD', u'username')('__class__', )('__delattr__', )('__dict__', {'username': u'_33B19A3D375D6FB2F746347885237', 'first_name': u'Paul', 'last_name': u'Marillonnet', 'is_active': True, '_state': , 'email': u'paul@nowhere.null', 'is_superuser': False, 'is_staff': False, 'last_login': datetime.datetime(2017, 2, 16, 16, 34, 2, 862424, tzinfo=), 'password': u'pbkdf2_sha256$20000$dOlXDrc6C0Yb$H7IyDF8WHzF0Nx9dmDZJlSlWxvaEwm1rzwzWvt6ExqE=', 'id': 31, 'date_joined': datetime.datetime(2017, 2, 16, 16, 34, 2, 712322, tzinfo=)})('__doc__', u'\n Users within the Django authentication system are represented by this\n model.\n\n Username, password and email are required. Other fields are optional.\n ')('__eq__', >)('__format__', )('__getattribute__', )('__hash__', >)('__init__', >)(u'__module__', 'django.contrib.auth.models')('__ne__', >)('__new__', )('__reduce__', >)('__reduce_ex__', )('__repr__', >)('__setattr__', )('__sizeof__', )('__str__', of >)('__subclasshook__', )('__unicode__', >)('__weakref__', None)('_check_column_name_clashes', >)('_check_field_name_clashes', >)('_check_fields', >)('_check_id_field', >)('_check_index_together', >)('_check_local_fields', >)('_check_m2m_through_same_relationship', >)('_check_managers', >)('_check_model', >)('_check_ordering', >)('_check_swappable', >)('_check_unique_together', >)('_default_manager', )('_deferred', False)('_do_insert', >)('_do_update', >)('_get_FIELD_display', >)('_get_next_or_previous_by_FIELD', >)('_get_next_or_previous_in_order', >)('_get_pk_val', >)('_get_unique_checks', >)('_meta', )('_perform_date_checks', >)('_perform_unique_checks', >)('_save_parents', >)('_save_table', >)('_set_pk_val', >)('_state', )('check', >)('check_password', >)('clean', >)('clean_fields', >)('date_error_message', >)('date_joined', datetime.datetime(2017, 2, 16, 16, 34, 2, 712322, tzinfo=))('delete', >)('email', u'paul@nowhere.null')('email_user', >)('first_name', u'Paul')('full_clean', >)('get_all_permissions', >)('get_full_name', >)('get_group_permissions', >)('get_next_by_date_joined', >)('get_next_by_last_login', >)('get_previous_by_date_joined', >)('get_previous_by_last_login', >)('get_session_auth_hash', >)('get_short_name', >)('get_username', >)('groups', )('has_module_perms', >)('has_perm', >)('has_perms', >)('has_usable_password', >)('id', 31)('is_active', True)('is_anonymous', >)('is_authenticated', >)('is_staff', False)('is_superuser', False)('last_login', datetime.datetime(2017, 2, 16, 16, 34, 2, 862424, tzinfo=))('last_name', u'Marillonnet')('logentry_set', )('natural_key', >)('password', u'pbkdf2_sha256$20000$dOlXDrc6C0Yb$H7IyDF8WHzF0Nx9dmDZJlSlWxvaEwm1rzwzWvt6ExqE=')('pk', 31)('prepare_database_save', >)('saml_identifiers', )('save', >)('save_base', >)('serializable_value', >)('set_password', >)('set_unusable_password', >)('unique_error_message', >)('user_permissions', )('username', u'_33B19A3D375D6FB2F746347885237')('validate_unique', >)