cd
into your project directory- clone this git repo using command
git clone https://github.com/divagicha/django_microblogging.git .
- create a virtual environment using your preferred python module and activate the virtual environment
- start postgresql and redis using command
docker-compose up -d
- run following commands (as is) in order (press
Enter
after each command)docker exec -it postgresql bash psql -U dbuser CREATE DATABASE microblog; ALTER ROLE dbuser SET client_encoding TO 'utf8'; ALTER ROLE dbuser SET default_transaction_isolation TO 'read committed'; ALTER ROLE dbuser SET timezone TO 'UTC'; exit exit
- generate and run django app migrations using command
python manage.py makemigrations && python manage.py migrate
- run command
pip install -r requirements.txt
- create superuser using command
python manage.py createsuperuser
- start django server using command
python manage.py runserver
- user superuser credentials to log in to the admin panel
http://localhost:8000/admin/
- navigate to the following link in your browser
http://localhost:8000/docs/
divagicha / django_microblogging Goto Github PK
View Code? Open in Web Editor NEWDjango based microblogging example