Setting up Django server for the first time. These should be the instructions to clone the project.
- git clone https://github.com/harryyy27/trydjango
- virtualenv -p python 3
- cd into root directory
- source bin/activate
- pip install -r requirements.txt
- cd into src
- set up config.py in src directory and type in a SECRET_KEY1 variable. Set it to any string
- set up a postgres DB in settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'db_name',
'USER': 'name',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
}
}
- python manage.py migrate
- python manage.py createsuperuser
- python manage.py runserver
- voila!