Development

Requirements

Install Locally

  1. Clone and change to the directory:

    git clone git@github.com:mozilla-services/push-dev-dashboard.git
    cd push-dev-dashboard
    
  2. Create and activate a virtual environment (Can also use virtualenvwrapper):

    virtualenv env
    source env/bin/activate
    
  3. Install requirements:

    pip install -r requirements.txt
    
  4. Source the .env file to set environment config vars (Can also use autoenv):

    source .env
    
  5. `Migrate`_ DB tables

    python manage.py migrate
    
  6. Create a superuser:

    python manage.py createsuperuser
    

Run it

  1. Source the .env file to set environment config vars (Can also use autoenv):

    source .env
    
  2. Activate the virtual environment (Can also use virtualenvwrapper):

    source env/bin/activate
    
  3. Run it:

    python manage.py runserver
    

Enable Firefox Accounts Auth

To enable Firefox Accounts authentication, you can use our local development OAuth client app.

  1. Add a django-allauth social app for Firefox Accounts (Log in as the superuser account you created):
    • Provider: Firefox Accounts
    • Name: fxa
    • Client id: 7a4cd4ca0fb1b5c9
    • Secret key: c10059ba24e6715a1b6f2c80f1cc398fb6a39ca18bc7554e894b36ea85b88eeb
    • Sites: example.com -> Chosen sites
  2. Log out of the admin account
  3. Sign in with a Firefox Account at http://127.0.0.1:8000.

Run the Tests

  1. Install test requirements:

    pip install requirements-test.txt
    
  2. Running the test suite:

    python manage.py test
    

Working on Docs

Install doc requirements:

pip install -r requirements-docs.txt

Building the docs is easy:

cd docs
sphinx-build . html

Read the beautiful docs:

open html/index.html

What to work on

We have Issues.