Changeset 8668 for mauRepo/dj_security


Ignore:
Timestamp:
06/11/12 12:59:20 (7 years ago)
Author:
mnagni
Message:

FIxes uncorrect context_processor definition

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

Legend:

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

    r8667 r8668  
    22import os 
    33 
     4 
    45def decode_relative_path(rel_path): 
    56    return os.path.join(os.path.dirname(__file__), rel_path).replace('\\', '/')   
     
    1213) 
    1314MANAGERS = ADMINS 
     15 
     16""" 
     17DATABASES = { 
     18    'default': { 
     19        'ENGINE': 'django.db.backends.sqlite3',                  
     20        'NAME': decode_relative_path('.') + '/sqlite.db', 
     21        'USER': '',                     
     22        'PASSWORD': '',                       
     23        'HOST': '',                       
     24        'PORT': '', 
     25    } 
     26} 
     27""" 
    1428 
    1529DATABASES = { 
     
    113127 
    114128# Python dotted path to the WSGI application used by Django's runserver. 
    115 WSGI_APPLICATION = 'dj_security.wsgi.application' 
     129#WSGI_APPLICATION = 'dj_security.wsgi.application' 
    116130 
    117131TEMPLATE_DIRS = ( 
     
    126140    'django.contrib.contenttypes', 
    127141    'django.contrib.sessions', 
    128     #'django.contrib.sites', 
     142    'django.contrib.sites', 
    129143    'django.contrib.messages', 
    130144    'django.contrib.staticfiles', 
     
    146160# One-week activation window; you may, of course, use a different value.     
    147161ACCOUNT_ACTIVATION_DAYS = 7  
     162 
     163# Adds to the site framework the current machine  
     164# where dj_security is deployed  
    148165import socket 
    149166try: 
     
    151168except Exception: 
    152169    HOSTNAME = 'localhost' 
    153 URL_ROOT = 'http://' + HOSTNAME + '/' + APPLICATION_ROOT 
     170from django.contrib.sites.models import Site  
     171from django.db.utils import DatabaseError    
     172try: 
     173    site = Site() 
     174    site.name = HOSTNAME 
     175    site.domain = HOSTNAME + '/' + APPLICATION_ROOT 
     176    site.save() 
     177    #Sets the default site 
     178    SITE_ID = site.pk 
     179except DatabaseError as ex: 
     180    print str(ex) 
     181 
     182 
    154183 
    155184TEMPLATE_CONTEXT_PROCESSORS = ( 
    156185    'django_authopenid.context_processors.authopenid', 
    157186    'django.core.context_processors.i18n', 
    158     'dj_security.context_processors.url_root' 
    159187) 
    160188 
     
    189217    } 
    190218} 
    191  
    192 import dj_security.dev_settings 
  • mauRepo/dj_security/trunk/dj_security/static/templates/registration/activation_email.txt

    r8666 r8668  
    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 {{ url_root }}/accounts/activate/{{ activation_key }}/ 
     4http://{{ site }}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.