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 stays
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- The settings require a .env file
- Add the missing values
python manage.py makemigrations users
python manage.py migrate users
python manage.py makemigrations core
python manage.py migrate core
python manage.py makemigrations locations
python manage.py migrate locations
python manage.py migrate
python manage.py cities_light
python manage.py collectstatic
cd P013/stays
source .venv/bin/activate
python manage.py runserver
python 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