Skip to content

D1st3f/Planetarium-API

Repository files navigation

Planetarium-API

Django REST API for the Planetarium project.

img.png

  • You can use following superuser (or create another one by yourself):
    • Login: FullAdmin
    • Password: admin
  • To create JTW go HERE and use given credentials.

⚡️ Features

  1. JWT authentication
  2. Full CRUD
  3. Orders creation for tickets
  4. Pagination
  5. Filtering feature
  6. Admin panel
  7. Full documentation here
  8. Rules for types of users

🧠 DB Schema

img.png

👩 Installation & Run in Docker

Click me

🧠 Set up the variables

In .env file connect db:

POSTGRES_HOST=db
POSTGRES_DB=app
POSTGRES_USER=postgressql
POSTGRES_PASSWORD=superhardpassword

👯 Compose Up

docker-compose build
docker-compose up

🤔 Login to Container

To get active containers

docker ps

Find our and copy id. Place it here and run:

docker exec -it "container_id" /bin/bash

📫 Install database fixture

python manage.py loaddata data.json

👩‍💻 Installation & Run in Venv

Click me

Check which DB you use in settings.py.

Set DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": BASE_DIR / "db.sqlite3", } } if you want use sqlite3 DB.

🧠 Set up the environment

On Windows:

python -m venv venv 
venv\Scripts\activate

On macOS:

python3 -m venv venv 
source venv/bin/activate

👯 Set up requirements

pip install -r requirements.txt

🤔 Migrate

python manage.py migrate

📫 Install database fixture

python manage.py loaddata data.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published