nephila/dev/: django-hierarchical-users-1.0 metadata and description

Homepage | Simple index

django-hierarchical-users

author Iacopo Spalletti
author_email info@nephila.it
classifiers
  • Development Status :: 4 - Beta
  • Environment :: Web Environment
  • Framework :: Django
  • Intended Audience :: Developers
  • Operating System :: OS Independent
  • Programming Language :: Python
  • Topic :: Internet :: WWW/HTTP :: Dynamic Content
  • Topic :: Software Development
  • Topic :: Software Development :: Libraries :: Application Frameworks
license see LICENCE
platform
  • OS Independent
File Tox results History
django-hierarchical-users-1.0.tar.gz
Size
8 KB
Type
Source
django_hierarchical_users-1.0-py2-none-any.whl
Size
14 KB
Type
Python Wheel
Python
2

Intro

DJerarchy is a tiny proof-of-concept Django project that handles a basic user hierarchy.

Users come in three “flavours”: admin, school managers and normal users.

School managers and normal users are associated to a school, through a FK to a dedicated model.

Admin is standard Django admin user and has access to http://localhost:8000/admin/.

A school manager for school Alpha can:

  • view all normal users belonging to school Alpha
  • create a number of new users through an automated procedure
  • perform some basic user editing

At the time being, normal users can’t do anything.

Install

  • create a dedicated virtualenv:

    mkvirtualenv djerarchy
    
  • install requirements:

    pip install -r requirements.txt
    
  • set a few environment variables:

    export DJANGO_SETTINGS_MODULE='djerarchy.settings'
    export DEBUG='True'
    export TEMPLATE_DEBUG='True'
    export DATABASE='sqlite:////path-to-djerarchy.sqlite'
    export SECRET_KEY='some-secret-key-here'
    export STATIC_ROOT='/path-to-djerarchy-static/'
    export MEDIA_ROOT='/path-to-djerarchy-media/'
    export ADMINS='[["John Doe", "john@example.com"]]'
    
  • create database tables and load data from fixtures:

    python manage.py syncdb --noinput --no-initial-data
    python manage.py migrate
    
  • run locally with command:

    python manage.py runserver