Changeset 8734 for mauRepo/dj_security


Ignore:
Timestamp:
18/03/13 13:16:51 (7 years ago)
Author:
mnagni
Message:

Incomplete - # 22686: [CEDA Site Python Port] Resource Registration - support for access to multiple resources
 http://team.ceda.ac.uk/trac/ceda/ticket/22686

Location:
mauRepo/dj_security/trunk/dj_security
Files:
1 deleted
1 edited

Legend:

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

    r8733 r8734  
    1313) 
    1414MANAGERS = ADMINS 
    15  
    16  
     15JEEVES_URL = 'http://cidev1.jc.rl.ac.uk/dj_jeeves' 
     16 
     17""" 
    1718DATABASES = { 
    1819    'default': { 
     
    2526    } 
    2627} 
    27  
    2828""" 
     29 
    2930DATABASES = { 
    3031    # This parameters are usually set during  
     
    4546    }  
    4647} 
    47 """ 
     48 
    4849 
    4950OPENID_AX = [ 
     
    159160    # 'django.contrib.admindocs', 
    160161) 
    161    
     162 
     163NOT_ENCODE = ['password', 'backend'] 
     164SHARED_SECRET = 'sharedsecret'    
     165APPLICATION_ROOT = 'PROJECT_NAME_PAR/' 
     166if APPLICATION_ROOT.startswith('PROJECT_NAME_'): 
     167    APPLICATION_ROOT = '' 
     168COOKIE_DOMAIN = 'COOKIE_DOMAIN_PAR' 
     169if COOKIE_DOMAIN.startswith('COOKIE_DOMAIN_'): 
     170    COOKIE_DOMAIN = 'uk' 
     171     
    162172# One-week activation window; you may, of course, use a different value.     
    163173ACCOUNT_ACTIVATION_DAYS = 7  
     174 
     175# Adds to the site framework the current machine  
     176# where dj_security is deployed  
     177import socket 
     178try: 
     179    HOSTNAME = socket.gethostname() 
     180except Exception: 
     181    HOSTNAME = 'localhost' 
     182from django.contrib.sites.models import Site  
     183from django.db.utils import DatabaseError    
     184try: 
     185    site = Site() 
     186    site.name = HOSTNAME 
     187    site.domain = HOSTNAME + '/' + APPLICATION_ROOT 
     188    site.save() 
     189    #Sets the default site 
     190    SITE_ID = site.pk 
     191except DatabaseError as ex: 
     192    print str(ex) 
     193 
     194 
    164195 
    165196TEMPLATE_CONTEXT_PROCESSORS = ( 
     
    216247    } 
    217248} 
    218  
    219 ################## 
    220 # LOCAL SETTINGS # 
    221 ################## 
    222  
    223 # Allow any settings to be defined in local_settings.py which should be 
    224 # ignored in your version control system allowing for settings to be 
    225 # defined per machine. 
    226 try: 
    227     from local_settings import * 
    228 except ImportError: 
    229     pass 
Note: See TracChangeset for help on using the changeset viewer.