P13 2023
- in staiys/stays rename the env file to .env
- add the missing values
You need to install Postgresql and Redis
Create postgresql user with the name "staydmin"
GRANT ALL PRIVILEGES ON DATABASE defaultdb TO staydmin;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO staydmin;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO staydmin;
- Clone the repository
- Checkout to branch main
cd stayspython -m venv .venvsource .venv/bin/activatepip install -r requirements.txt
- The settings require a .env file
- Add the missing values
python manage.py makemigrations userspython manage.py migrate userspython manage.py makemigrations corepython manage.py migrate corepython manage.py makemigrations locationspython manage.py migrate locationspython manage.py migrate
python manage.py cities_light
python manage.py collectstatic
cd P013/stayssource .venv/bin/activatepython manage.py runserverpython manage.py migrate
- In another terminal
python manage.py createsuperuser - Define the email and the password of your superuser
- You can connect at
localhost:5000/admin
python manage.py runtests