- All of the pages are stored in the
templates/directory. Each page inherits frombase.htmland adds the necessary markup. - All of the static files (CSS, JS, images, etc.) are stored in the
api/staticdirectory. - See the templates for examples of extending the base template and accessing static files.
- Run a local server with
python3 manage.py runserver 8000. You have to run a server to properly view the pages. - You can create a new page in
api/urls.py.
- Clone the repo -
git clone <repo_url>in your working directory - Create a virtual env -
virtualenv academyenvand then activate thee virtual env -source /academyenv/bin/activate(Note: You should be in the project root directory) - If step 2 gives you an error, make sure you have virtual env installed. Run
pip3 install --upgrade pipandpip3 install virtualenvto install virtualenv - Make sure pip points to your activated virtual env via
which pipand then runpip install -r requirements.txt - Go to
/academy_backendsub dir and make a .env file -vim .envand paste the env configuration in the slack - In the env file, make the following change if you want to use the local sqlite db -
DJANGO_DATABASE=debug - Run
python manage.py makemigrationsand thenpython manage.py migrateONLY if you are using sqlite db. (Note: Make sure you are in the project root directory) - You can create a superuser(for Django admin) by running
python manage.py createsuperuserand follow the instructions - Run
python manage.py runserverto locally run the application