My favorites | Sign in
Project Logo
                
Search
for
Updated Aug 02, 2007 by snhorne
Labels: Featured
HowToInstall  
How to install the account application

Introduction

The account application is set up as described in: http://code.djangoproject.com/wiki/BestPracticesToWorkWith3rdPartyAppsAndMakingYoursPortable

The following steps assume you put the 'account' module in the directory 'c:\web\shared\'. If you use another directory, just substitute.

Steps:

  1. Do the checkout
  2. svn checkout http://django-accounts.googlecode.com/svn/trunk/
  3. Disable the default session middleware in your project's setup.py
  4. #'django.contrib.sessions.middleware.SessionMiddleware',
  5. Add the following to your project's setup.py
  6. DEVELOPMENT = True 
    if DEVELOPMENT: 
        import sys 
        sys.path.append('C:/web/shared') # Use your actual directory
    )
    PERSISTENT_SESSION_KEY = 'sessionpersistent'
    SESSION_COOKIE_AGE = 120960
    
    MIDDLEWARE_CLASSES = (
        ... < other middleware >...
        'account.middleware.DualSessionMiddleware',
        'account.middleware.AccountBasedAuthentication',
    )
    
    TEMPLATE_CONTEXT_PROCESSORS = (
        ... < other processors >...
        "account.middleware.add_account_to_context",
    )    
    INSTALLED_APPS = (
        ... < other apps >...
        'account',
    )
    TEMPLATE_DIRS = (
        ... < other dirs >...
        "C:/web/shared/account/templates", # Use your actual directory
    )
    
  7. If you use modpython, add c:/web/shared (or your actual path) to the pythonpath in apache your apache configuration file.
  8. Add the following line to your project's urls.py file
  9. (r'^person/', include('account.person_urls')),

Comment by holdenweb, Sep 18, 2008

s/setup.py/settings.py/

Comment by daloore, Mar 26, 2009
ACCOUNT_DOMAINS = enumerate(['example.com'])
Comment by daloore, Mar 26, 2009
from account.lib import timezones
ACCOUNT_TIME_ZONES = timezones.TIME_ZONES
ACCOUNT_DEFAULT_TIME_ZONE = 'Europe/London'

Sign in to add a comment
Hosted by Google Code