Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 1.79 KB

README.rst

File metadata and controls

70 lines (51 loc) · 1.79 KB

django-accountmanager

Django application that provides drop-in support for the Mozilla Account Manager addon. It's not quite usable yet. Stay tuned.

Requirements

In order to use django-accountmanager, you will need to install:

Installation

Install django-accountmanager from the git repository:

pip install -e git://github.com/paulosman/django-accountmanager#egg=accountmanager

Add django-accountmanager to your INSTALLED_APPS in settings.py after wellknown:

INSTALLED_APPS = (
    ...
    'wellknown',
    ...
    'accountmanager',
    ...
)

Add accountmanager.middleware.StatusHeader to MIDDLEWARE_CLASSES in settings.py:

MIDDLEWARE_CLASSES = (
   ...
   'accountmanager.middleware.StatusHeader',
   ...
)

Configure urls.py in your project:

urlpatterns = patterns('',
    ...
    (r'^accountmanager/', include('accountmanager.urls'))
)

Configure account manager control document settings in settings.py:

AMCD_CONFIG = {
    'connect': {
        'method': 'POST',
        'path_view': 'users.views.login',
        'params': {
            'username': 'username',
            'password': 'password'
        }
    },
    'disconnect': {
        'method': 'GET',
        'path_view': 'users.views.logout'
    }
}

Optionally specify custom reverse function in settings.py:

AMCD_RESOLVER_FUNCTION = 'l10n.urlresolvers.reverse'