Skip to main content

Accounts app.

Project description

===============
django-yaccounts
===============

YACCOUNTS == Yet/Why Another Django Accounts App


Installation
============

1. Download dependencies:
- Python 2.6+
- Django 1.5+

2. ``pip install django-yaccounts`` or ``easy_install django-yaccounts``


Configuration
=============

settings.py
-----------

1. Add "yaccounts" to your INSTALLED_APPS setting like this::

INSTALLED_APPS = (
# all other installed apps
'yaccounts',
)

2. Add logger handler::

LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
# all other handlers
'log_file_yaccounts': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(os.path.join(os.path.dirname( __file__ ), '..'), 'logs/yaccounts.log'),
'maxBytes': '16777216', # 16megabytes
},
},
'loggers': {
# all other loggers
'yaccounts': {
'handlers': ['log_file_yaccounts'],
'propagate': True,
'level': 'DEBUG',
}
}
}

3. Configure User model by adding the following line your settings:

``AUTH_USER_MODEL = 'yaccounts.User'``

Logs
----

Create a 'logs' folder in your project's root folder (if you don't have one already).
Your project folder should look something like this::

myproject/
__init__.py
settings.py
urls.py
wsgi.py
logs/
manage.py

Database
--------

Run ``python manage.py syncdb`` to create the yaccounts models.

URLs
----

1. Add app URL namespace to top-level ``urls.py``::

# myproject/urls.py
# ============

urlpatterns = patterns('',
# all other url mappings
url(r'^account', include('yaccounts.urls', namespace='accounts')),
)

2. Add app to API namespace::

# myproject/api/urls.py
# ============

urlpatterns = patterns('',
# all other api url mappings
url(r'^/account', include('yaccounts.api.urls', namespace='accounts')),
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-yaccounts-0.1.tar.gz (14.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page