politico-civic-biography


License
MIT
Install
pip install politico-civic-biography==0.2.2

Documentation

POLITICO

django-politico-civic-biography

Quickstart

  1. Install the app.
$ pip install django-politico-civic-biography
  1. Add the app to your Django project and configure settings.
INSTALLED_APPS = [
    # ...
    'rest_framework',
    'entity',
    'geography',
    'government',
    'election',
    'biography',
]

#########################
# biography settings

BIOGRAPHY_API_AUTHENTICATION_CLASS = 'rest_framework.authentication.BasicAuthentication' # default
BIOGRAPHY_API_PERMISSION_CLASS = 'rest_framework.permissions.IsAdminUser' # default
BIOGRAPHY_API_PAGINATION_CLASS = 'biography.pagination.ResultsPagination' # default

Developing

Running a development server

Developing python files? Move into example directory and run the development server with pipenv.

$ cd example
$ pipenv run python manage.py runserver

Developing static assets? Move into the pluggable app's staticapp directory and start the node development server, which will automatically proxy Django's development server.

$ cd biography/staticapp
$ gulp

Want to not worry about it? Use the shortcut make command.

$ make dev
Setting up a PostgreSQL database
  1. Run the make command to setup a fresh database.
$ make database
  1. Add a connection URL to the .env file.
DATABASE_URL="postgres://localhost:5432/biography"
  1. Run migrations from the example app.
$ cd example
$ pipenv run python manage.py migrate