Changeset 8699 for mauRepo/dj_security


Ignore:
Timestamp:
10/12/12 14:43:04 (7 years ago)
Author:
mnagni
Message:

switches from a user/password login to an OpenID one.
Applies the CEDA mezzanine layout

Location:
mauRepo/dj_security/trunk/dj_security
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/dj_security/trunk/dj_security/settings.py

    r8687 r8699  
    1313) 
    1414MANAGERS = ADMINS 
    15  
    16 """ 
     15JEEVES_URL = 'http://cidev1.jc.rl.ac.uk/dj_jeeves' 
     16 
     17 
    1718DATABASES = { 
    1819    'default': { 
     
    4546    }  
    4647} 
     48""" 
     49 
     50OPENID_SREG = { 
     51    "required": ["country", "nickname", "email"], 
     52    "optional": "fullname" 
     53}  
     54 
    4755 
    4856# Local time zone for this installation. Choices can be found here: 
     
    119127    'django.contrib.auth.middleware.AuthenticationMiddleware', 
    120128    'django.contrib.messages.middleware.MessageMiddleware', 
    121     #'django_authopenid.middleware.OpenIDMiddleware', 
     129    'django_authopenid.middleware.OpenIDMiddleware', 
    122130    'dj_security.middleware.DJ_Security_Middleware', 
    123131    # Uncomment the next line for simple clickjacking protection: 
     
    146154    'registration', 
    147155    'django.contrib.humanize', 
    148     #'django_authopenid', 
     156    'django_authopenid', 
    149157    'dj_security', 
    150158    # Uncomment the next line to enable the admin: 
  • mauRepo/dj_security/trunk/dj_security/static/templates/authopenid/base.html

    r8650 r8699  
    1 <!DOCTYPE html> 
    2 <html lang="en"> 
     1{% load ttags %} 
     2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
     3<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> 
     4 
     5<!--  Version: Multiflex-5.4 / Overview                     --> 
     6<!--  Type:    Design with sidebar                          --> 
     7<!--  Date:    March 13, 2008                               --> 
     8<!--  Design:  www.1234.info                                --> 
     9<!--  License: Fully open source without restrictions.      --> 
     10<!--           Please keep footer credits with the words    --> 
     11<!--           "Design by 1234.info". Thank you!            --> 
     12 
    313    <head> 
    4         <meta charset="utf-8"/> 
    5         <title>django-authopenid Example App</title> 
     14        <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
     15        <title></title> 
    616        <!--[if IE]> 
    717 
     
    2434        {% endif %} 
    2535 
     36                <link rel="stylesheet" type="text/css" media="screen,projection,print" href="{% getsettings 'JEEVES_URL' %}/code/css/mf54_reset.css" /> 
     37        <link rel="stylesheet" type="text/css" media="screen,projection,print" href="{% getsettings 'JEEVES_URL' %}/code/css/mf54_grid_nosidebar.css" /> 
     38        <link rel="stylesheet" type="text/css" media="screen,projection,print" href="{% getsettings 'JEEVES_URL' %}/code/css/mf54_content_nosidebar.css" /> 
     39 
    2640        <link rel="stylesheet" href="{{ STATIC_URL }}css/base.css" /> 
    2741        <link rel="stylesheet" href="{{ STATIC_URL }}css/openid.css" /> 
     
    3044    </head> 
    3145    <body> 
    32         <header id="top"> 
    33             <h1>django-authopenid Example App</h1> 
    34         </header> 
     46  <div class="container" id=""> 
     47<!-- A. HEADER -->          
     48    <div class="corner-page-top"></div>         
     49    <div class="header"> 
     50      <div class="header-top"> 
    3551         
    36         {% block content %}{% endblock %} 
     52        <!-- A.1 SITENAME -->       
     53        <a class="sitelogo" href="http://www.ceda.ac.uk/" title="Home"></a> 
     54        <div class="sitename"> 
     55        </div> 
    3756         
    38         <script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.min.js"></script> 
     57        <!-- <script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.min.js"></script> --> 
    3958 
    4059        {% block extra_scripts %}{% endblock %} 
    4160         
    42         <footer id="bottom"> 
    43         <p>This is an example of how to use <strong>django-authopenid</strong> with modified   
    44         <a href="http://code.google.com/p/openid-selector/">Javascript OpenID-Selector</a> in a <a href="http://djangoproject.com">django</a> application. <a href="http://bitbucket.org/benoitc/django-authopenid/">More...</a> 
    45         </footer> 
     61      </div> 
     62     </div> 
     63     <div class="corner-page-bottom"></div> 
     64      
     65     <!-- C. MAIN SECTION --> 
     66     <div class="corner-page-top"></div>            
     67     <div class="main">      
     68        <!-- C.1 CONTENT --> 
     69        <div class="content"> 
     70                <!-- CONTENT CELL -->                                
     71                <a id="anchor-heading-1"></a> 
     72                <div class="corner-content-1col-top"></div>   
     73                <div class="content-1col-nobox">                 
     74                <h1> 
     75                                        Login 
     76                                </h1> 
     77                                <div class="content-1col-nobox"> 
     78                                        {% block content %}{% endblock %} 
     79                                </div>       
     80                </div> 
     81                <div class="corner-content-1col-bottom"></div> 
     82                </div>     
     83         </div> 
     84        <!-- D. FOOTER -->       
     85        <div class="footer"> 
     86          <a href="http://www.ncas.ac.uk"><img src="{% getsettings 'JEEVES_URL' %}/image/logos/ncas_logo_fullcolour.jpg" alt="NCAS logo" title="NCAS" align="left"/></a> 
     87          <a href="http://www.nceo.ac.uk"><img src="{% getsettings 'JEEVES_URL' %}/image/logos/nceo_logo.jpg" alt="NCEO logo" title="NCEO" align="right"/></a> 
     88          <p>Copyright &copy; 2011 STFC&nbsp;&nbsp;|&nbsp;&nbsp;All Rights Reserved</p> 
     89 
     90           
     91          <p class="credits">Original design by <a href="http://1234.info/" title="Designer Homepage">1234.info</a> | <a href="http://validator.w3.org/check?uri=referer" title="Validate XHTML code">XHTML 1.0</a> | <a href="http://jigsaw.w3.org/css-validator/" title="Validate CSS code">CSS 2.0</a> 
     92           | Powered by <a href="http://mezzanine.jupo.org">Mezzanine</a> | <a href="/set_device/mobile/?next=/data-centres/">View Mobile Site.</a></p> 
     93        </div> 
     94          
     95         <div class="corner-page-bottom"></div>           
     96    </div> 
    4697    </body> 
    4798</html> 
  • mauRepo/dj_security/trunk/dj_security/static/templates/authopenid/signin.html

    r8650 r8699  
    2020<br> 
    2121{% endif %} 
     22<!-- 
    2223<h2>Make a choice:</h2> 
    2324<p> <a href="{% url registration_register %}">Register</a> | <a href="{% url user_signin %}">Log-In</a></p> 
     25--> 
    2426<div class="login"> 
    2527 
     28<!-- 
    2629    <form id="auth_form" name="auth_form" action="{% url user_signin %}" method="post"> 
    2730    {% csrf_token %} 
     
    3942        <div class="submit-row"><input type="submit" name="blogin" value="{% trans "Sign in" %}"> </div> 
    4043        </fieldset> 
    41 </form> 
     44        </form> 
     45--> 
    4246 
    4347<form id="openid_form" name="openid_form" action="{% url user_signin %}" method="post"> 
  • mauRepo/dj_security/trunk/dj_security/urls.py

    r8678 r8699  
    1515    # Uncomment the next line to enable the admin: 
    1616    # url(r'^admin/', include(admin.site.urls)), 
    17     url(r'^accounts/', include('registration.backends.default.urls')), 
     17    #url(r'^accounts/', include('registration.backends.default.urls')), 
    1818    url(r'^account/', include('django_authopenid.urls')), 
    1919) 
    2020 
    2121 
    22 urlpatterns += patterns('dj_security.views.dj_security_login', 
    23     (r'^login$', 'login'), 
    24 ) 
     22#urlpatterns += patterns('dj_security.views.dj_security_login', 
     23#    (r'^login$', 'login'), 
     24#) 
    2525urlpatterns += patterns('dj_security.views.my_profile', 
    26     (r'^accounts/profile/$', 'frontpage'), 
     26    (r'^account/signin/$', 'frontpage'), 
    2727) 
    2828print urlpatterns 
Note: See TracChangeset for help on using the changeset viewer.