Skip to content

radthenone/ticket-system

Repository files navigation

Project: TICKET SYSTEM

  1. admin authomatic created
  2. token authomatic created with login

Image

Running

1. LOCAL

backend

  • use sqlite like a db
  • use uv and python to local backend
  https://docs.astral.sh/uv/getting-started/installation/
cd backend
uv pip install .[dev,test]
uv run python src/manage.py makemigrations
uv run python src/manage.py migrate
uv run python src/manage.py runserver

frontend

  • you need node and npm
  https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
cd frontend
npm start

2. DOCKER

  • use postgres like a db
docker compose --profile dev up --build -d

logs

  • docker attach web
  • docker attach front

exec

  • docker exec -it web sh
  • docker exec -it front sh
http://127.0.0.1:8000/admin/
http://127.0.0.1:8000/api/...
http://127.0.0.1:3000

Backend

POST
{
  "username": "a",
  "password": "aaaaa",
  "auto": "false"
}
OR
{
  "username": "a",
  "password": "aaaaa"
}
OR
{
  "auto": "true"
}
http://127.0.0.1:8000/api/auth/login/
POST
http://127.0.0.1:8000/api/auth/logout/
POST
{
  "username": "a",
  "password": "aaaaa",
  "email": "[email protected]"
}
http://127.0.0.1:8000/api/auth/create_superuser/
GET
http://127.0.0.1:8000/api/tickets/:ticket_id/
GET
http://127.0.0.1:8000/api/tickets/
POST
{
  "title": "Some title4",
  "description": "Lorem dasdsadsadsadsadassda"
}
http://127.0.0.1:8000/api/tickets/
PUT
{
  "title": "Some title",
  "description": "Lorem dasdsadsadsadsadassda",
  "status": "in_progress"
}
http://127.0.0.1:8000/api/tickets/:ticket_id/
PATCH
{
  "status": "in_progress"
}
http://127.0.0.1:8000/api/tickets/:ticket_id/
DELETE
http://127.0.0.1:8000/api/tickets/:ticket_id/

Tests

  1. local
cd backend
uv run pytest -v -s

OR docker

docker exec -it web sh
pytest -v -s
cd frontend
npm test

OTHER IMAGES

Image

Image

About

Simple Angular/Django application for submitting applications

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published