This project was completed as part of Writing your first Django app form Django documentation. I am tasked to make full use of Django and Python knowledge and its accompanying documentation to create an APIs for polls and vote.
This project was created with:
- Python
- Django
- PostgreSQL
Clone the project
git clone https://github.com/SupTarr/Python-Django-TemplateTo install Python on your machine go to Python Download.
py --versionTo install virtualenv via pip
py -m pip install --user virtualenvTo create a virtual environment for your project, open a new command prompt, navigate to the folder where you want to create your project and then enter the following:
py -m virtualenv .To activate the environment, run:
.\Scripts\activate.batIn the command prompt, ensure your virtual environment is active, and execute the following command:
pip install -r requirements.txtCreate a mysite directory in your current directory.
django-admin startproject mysiteTo create your app, make sure you’re in the same directory as manage.py and type this command:
py manage.py startapp app_nameVerify it’s working with the following command:
python manage.py runserver