Django Polls with DRF API
- Clone this repository : git clone https://github.com/campbellchri/polls_djangular.git
- Make a new virtualenv (outside of the polls_djangular directory/repo):
virtualenv pollsEnv
- Activate the virtualenv:
source pollsEnv/bin/activate
- Install the project requirements:
pip install -r polls_djangular/requirements.txt
- Edit
mysite/settings.py:36
to match your timezone - Navigate to the polls_djangular directory and sync the database :
python manage.py syncdb
- Install the frontend dependencies :
python manage.py bower_install
- Collect the static files :
python manage.py collectstatic
- Run the server:
python manage.py runserver 8000
- Navigate to the polls angular application
http://localhost:8000/polls_app/
or admin athttp://localhost:8000/admin
(admin:admin)
http://127.0.0.1:8000/polls_app/ -> Angular Application http://127.0.0.1:8000/admin/ -> Django Admin panel http://127.0.0.1:8000/api/ -> Django Rest Framework Admin, sample endpoints for the API
Javascript files are found in : static/static/polls_app
- Activate the virtualenv:
source pollsEnv/bin/activate
- Run the server:
python manage.py runserver
- Open website in browser at
http://localhost:8000/polls
or admin athttp://localhost:8000/admin
(admin:admin)