Changeset 8664 for mauRepo


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

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

Legend:

Unmodified
Added
Removed
  • mauRepo/dj_security/trunk/README

    r8659 r8664  
    55 
    66In its default configuration it will reply to the incoming requests at path '/login'. 
     7 
     8The application contains a few configurable parameters concentrate in settings.py 
     9 
     101) APPLICATION_ROOT: the root where the HTTP service is available, say "dj_security" 
     112) the deafult dataset 'DB_xxx' parameters, that is: 
     12'ENGINE':   'DB_ENGINE',  
     13'NAME':     'DB_NAME', 
     14'USER':     'DB_USER', 
     15'PASSWORD': 'DB_PASSWORD', 
     16'HOST':     'DB_HOST', 
     17'PORT':     'DB_PORT',    
    718   
  • 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 
  • mauRepo/dj_security/trunk/dj_security/static/templates/registration/activation_email.txt

    r8650 r8664  
    22Someone, hopefully you, signed up for a new account at djangoproject.com using this email address. If it was you, and you'd like to activate and use your account, click the link below or copy and paste it into your web browser's address bar: 
    33 
    4 http://127.0.0.1:8000/accounts/activate/{{ activation_key }}/ 
     4{{ URL_ROOT }}/accounts/activate/{{ activation_key }}/ 
    55 
    66If you didn't request this, you don't need to do anything; you won't receive any more email from us, and the account will expire automatically in {{ expiration_days|apnumber }} days. 
Note: See TracChangeset for help on using the changeset viewer.