Metadata-Version: 2.1
Name: politico-civic-government
Version: 1.0a1.dev1
Summary: Manage government and party organizations, the POLITICO way.
Home-page: https://github.com/The-Politico/politico-civic-government/
Author: POLITICO interactive news
Author-email: interactives@politico.com
License: MIT
Download-URL: https://github.com/The-Politico/politico-civic-government/archive/1.0a1.dev1.tar.gz
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 2.0
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet :: WWW/HTTP
Description-Content-Type: text/markdown
Requires-Dist: django
Requires-Dist: djangorestframework
Requires-Dist: dj-database-url
Requires-Dist: psycopg2-binary
Requires-Dist: politico-civic-utils
Requires-Dist: politico-civic-entity
Requires-Dist: politico-civic-geography
Requires-Dist: tqdm
Requires-Dist: us
Provides-Extra: dev
Requires-Dist: sphinx ; extra == 'dev'
Requires-Dist: sphinxcontrib-django ; extra == 'dev'
Requires-Dist: sphinx-rtd-theme ; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

![POLITICO](https://rawgithub.com/The-Politico/src/master/images/logo/badge.png)

# politico-civic-government

Create and manage the basic structure of federal, state and local government, the POLITICO way.

### Quickstart

1. Install the app.

  ```
  $ pip install politico-civic-government
  ```

2. Add the app and dependencies to your Django project and configure any needed settings.

  ```python
  INSTALLED_APPS = [
      # ...
      'rest_framework',
      'entity',
      'geography',
      'government',
  ]
```



### Bootstrapping your database

1. Ensure `PROPUBLICA_CONGRESS_API_KEY` is exported into your environment. If you don't have an API key for the ProPublica Congress API, you can request one [here](https://www.propublica.org/datastore/api/propublica-congress-api).

2. Bootstrap the database.

```
$ python manage.py bootstrap_government
```

### Developing

##### Running a development server

Move into the example directory, install dependencies and run the development server with pipenv.

  ```
  $ cd example
  $ pipenv install
  $ pipenv run python manage.py runserver
  ```

##### Setting up a PostgreSQL database

1. Run the make command to setup a fresh database.

  ```
  $ make database
  ```

2. Add a connection URL to `example/.env`.

  ```
  DATABASE_URL="postgres://localhost:5432/government"
  ```

3. Run migrations from the example app.

  ```
  $ cd example
  $ pipenv run python manage.py migrate
  ```


