Ignore:
Timestamp:
06/11/12 08:45:36 (7 years ago)
Author:
mnagni
Message:

corrected the email template in order to send the actual URL of the authentication system NOT 'localhost' as before

File:
1 edited

Legend:

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

    r8663 r8664  
    1111    # ('Your Name', 'your_email@example.com'), 
    1212) 
    13  
    1413MANAGERS = ADMINS 
    1514 
     
    110109 
    111110TEMPLATE_DIRS = ( 
    112     decodeRelativePath('templates')  
     111    decodeRelativePath('static/templates')  
    113112    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". 
    114113    # Always use forward slashes, even on Windows. 
     
    120119    'django.contrib.contenttypes', 
    121120    'django.contrib.sessions', 
    122     'django.contrib.sites', 
     121    #'django.contrib.sites', 
    123122    'django.contrib.messages', 
    124123    'django.contrib.staticfiles', 
     
    133132) 
    134133 
     134APPLICATION_ROOT = 'PROJECT_NAME_PAR/' 
     135if APPLICATION_ROOT.startswith('PROJECT_NAME_'): 
     136    APPLICATION_ROOT = '' 
    135137ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window; you may, of course, use a different value. 
    136 #EMAIL_HOST='localhost' 
    137 #EMAIL_PORT=1023 
    138 #EMAIL_HOST_USER='' 
    139 #EMAIL_HOST_PASSWORD='' 
     138import socket 
     139try: 
     140    HOSTNAME = socket.gethostname() 
     141except: 
     142    HOSTNAME = 'localhost' 
     143URL_ROOT = 'http://' + HOSTNAME + '/' + APPLICATION_ROOT 
    140144 
    141145TEMPLATE_CONTEXT_PROCESSORS = ( 
    142146    'django_authopenid.context_processors.authopenid', 
    143147    'django.core.context_processors.i18n', 
     148    'dj_security.context_processors.settings' 
    144149) 
    145150 
    146151AUTH_PROFILE_MODULE = 'dj_security.UserProfile' 
    147  
    148152 
    149153# A sample logging configuration. The only tangible logging 
Note: See TracChangeset for help on using the changeset viewer.