Skip to main content

Accounts app.

Project description


YACCOUNTS == Yet/Why Another Django Accounts App


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

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


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

# all other installed apps

2. Add logger handler::

'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'``

4. Configure authentication backends to enable Yaccount's authentication backends (e.g. Authentication Key, Twitter, etc) for account email confirmation::


5. Configure YACCOUNT's settings::

# API URL Namespace (e.g. YAPI URL is in /api/v1, and the respective Django URL namespaces are 'api' and 'v1')
'api_url_namespace': 'api:v1',

# Enabled signup types (possible: 'EMAIL', 'FACEBOOK', 'TWITTER')
'signup_available': ['EMAIL'], # Only email signup enabled

# Application emails 'sender'.
'email_from': { 'name': 'Administrator', 'email': '' },

# Twitter Application's OAuth Settings.
'twitter_oauth': {
'consumer_key': '{{ YOUR_APP_CONSUMER_KEY }}',
'consumer_secret': '{{ YOUR_APP_CONSUMER_SECRET }}'

# Facebook Application's OAuth Settings.
'facebook_oauth': {
'app_id': '{{ APP_ID }}',
'app_secret': '{{ APP_SECRET }}'

6. Don't forget to set the 'MEDIA_URL' variable, which defines the root folder to where files will be uploaded (e.g. profile pictures) and the
variable necessary for the full URL's of the pictures to be built::

MEDIA_ROOT = os.path.join(BASE_DIR, 'static/uploads/')
MEDIA_URL = HOST_URL + '/static/uploads/'

7. Configure template processors so tha every RequestContext will contain a variable request, which is the current HttpRequest. This will be used for stuff
such as knowing the current path.

from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP


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::



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


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

# myproject/
# ============

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

2. Add app to API namespace::

# myproject/api/
# ============

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

Project details

Download files

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

Files for django-yaccounts, version 0.4.1
Filename, size File type Python version Upload date Hashes
Filename, size django-yaccounts-0.4.1.tar.gz (522.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page