Academy-back
Installation
To set up the project locally, follow these steps:
-
Clone the repository
git clone git@github.com:avazcoderr/academy-back.git cd academy-back -
Create a virtual environment
python3 -m venv venv source venv/bin/activate # For Windows, use `venv\Scripts\activate`
-
Install required packages
pip install -r requirements.txt
-
PostgreSQL setup
Install PostgreSQL and create database:
# Install PostgreSQL (Ubuntu/Debian)
sudo apt update
sudo apt install postgresql postgresql-contrib
# Create database
sudo -u postgres psql
CREATE DATABASE my_db;
CREATE USER test_user WITH PASSWORD 'your_strong_password';
GRANT ALL PRIVILEGES ON DATABASE my_db TO my_user;
\q-
Configure Environment Variables Rename the .env.example file to .env and replace your_secret_key with your actual Django secret key, along with any other necessary environment-specific values:
SECRET_KEY=your_secret_key
-
Apply migrations
python manage.py migrate
-
Create a superuser
python manage.py createsuperuser
-
Run the project
python manage.py runserver
Usage
After starting the project, you can access the following URLs:
http://localhost:8000/ - Home page
http://localhost:8000/admin/ - Admin panel