Oqy.kz - Online IT courses platform
-
Configure virtual environment settings
1.1 Create virtual environment and activate it
virtualenv -p python3.8 .venv source .venv/bin/activate
1.2 Install required libraries
pip install -r requirements.txt
-
Configure database administration
2.1. install postgresql
2.2. open shell prompt
sudo su - postgres psql
2.3. Run the following commands:
CREATE DATABASE oqy_db with encoding='UTF-8' LC_CTYPE='en_US.UTF-8' LC_COLLATE='en_US.UTF-8' TEMPLATE=template0;; CREATE ROLE oqy_user WITH PASSWORD 'oqy_pass' GRANT ALL PRIVILEGES ON DATABASE oqy_db to oqy_user; ALTER ROLE oqy_user LOGIN CREATEDB;
-
Migrate the database and create super user
./manage.py migrate ./manage.py compilemessages
./manage.py createsuperuser username:admin email:admin@oqy.kz password:admin_password
-
Run the server and check it by opening localhost:8000 in web browser
./manage.py runserver