πŸ‘·Structura

Jst-django fayil structurasi

Asosiy Structura

β”œβ”€β”€ config # barcha config fayillar
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ asgi.py
β”‚Β Β  β”œβ”€β”€ celery.py
β”‚Β Β  β”œβ”€β”€ conf # qo'shimcha o'rnatilgan kutubxona configlar ishu papkada alohida fayil sifatida yoziladi
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ apps.py # INSTALL_APPS avjud
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ cache.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ celery.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ channels.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ ckeditor.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ cron.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ jwt.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ logs.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ modules.py # jst yordamida yartilgan applar INSTALL_APPS da emas shu fayildagi MODULES o'zgaruvchisiga kiritiladi
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ navigation.py # django unfold admin panelda chiqishi kerak bo'lgan model
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ rest_framework.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ spectacular.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ storage.py
β”‚Β Β  β”‚Β Β  └── unfold.py
β”‚Β Β  β”œβ”€β”€ env.py
β”‚Β Β  β”œβ”€β”€ settings # Sozlamalar
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ common.py # Asosiy sozlamamlar
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ local.py # Faqat localda ishlashi kerak bo'lgan sozlamalar
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ production.py # Productionda ishlashi kerak bo'lgan sozlamalr
β”‚Β Β  β”‚Β Β  └── test.py # make test qilinganda ishlatiladigan sozlamale
β”‚Β Β  β”œβ”€β”€ urls.py
β”‚Β Β  └── wsgi.py
β”œβ”€β”€ core # Loyiha
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ apps # barcha applar
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ accounts # Default accounts app authorization tayyor
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ admin
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ apps.py
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ choices
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ managers
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ migrations
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ models
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ seeder
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ serializers
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ signals
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ tasks
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  └── sms.py
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ urls.py
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── views
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ logs
β”‚Β Β  β”‚Β Β  └── shared
β”‚Β Β  β”œβ”€β”€ services # Umumiy servicelar uchun
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ otp.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ sms.py
β”‚Β Β  β”‚Β Β  └── user.py
β”‚Β Β  └── utils
β”‚Β Β      β”œβ”€β”€ __init__.py
β”‚Β Β      β”œβ”€β”€ cache.py
β”‚Β Β      β”œβ”€β”€ console.py
β”‚Β Β      β”œβ”€β”€ core.py
β”‚Β Β      └── storage.py
β”œβ”€β”€ docker # Docker fayiller
β”‚Β Β  β”œβ”€β”€ Dockerfile.nginx
β”‚Β Β  └── Dockerfile.web
β”œβ”€β”€ docker-compose.prod.yml 
β”œβ”€β”€ docker-compose.test.yml
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Jenkinsfile
β”œβ”€β”€ jst.json # jst config json
β”œβ”€β”€ k8s # Kubernetes
β”œβ”€β”€ Makefile
β”œβ”€β”€ manage.py
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ README.MD
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ resources
β”‚Β Β  β”œβ”€β”€ layout
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Dockerfile.alpine
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Dockerfile.nginx
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ mypy.ini
β”‚Β Β  β”‚Β Β  └── nginx.conf
β”‚Β Β  β”œβ”€β”€ logs
β”‚Β Β  β”œβ”€β”€ media
β”‚Β Β  └── scripts
β”‚Β Β      β”œβ”€β”€ backup.sh
β”‚Β Β      β”œβ”€β”€ entrypoint-server.sh
β”‚Β Β      └── entrypoint.sh
└── stack.yaml # loyihani deploy qilish uchun swarm yordamida

Qo'shimcha avvaldan yozilgan applar

|-- core
    |-- apps
        |-- accounts
            |-- admin
            |-- models
                |-- reset_token.py # parolni tiklashda beriladigan token
            |-- serializers
                |-- change_password.py
                |-- set_password.py
            |-- test
                |-- test_auth.py
                |-- test_change_password.py
            |-- views
                |-- change_password.py
                |-- sms.py # sms orqali auth to'liq yozilgan
            |-- apps.py
            |-- urls.py
    |-- http
        |-- admin
            |-- core.py
            |-- user.py # custom admin class
        |-- choices
            |-- user.py # user roles TextChoice
        |-- management
        |-- managers
            |-- user.py # user model custom manager
        |-- middlewares
            |-- cache.py # cache middleware
            |-- exception.py # Base Exceptions
        |-- models
            |-- base.py # AbstractBaseModel barcha moddelar uchun base model
            |-- user.py # Custom user model
        |-- paginations
            |-- default.py # Default pagination shuni ishlatish tafsiya etiladi
        |-- permissions
            |-- role.py # Role permission
        |-- seeder
            |-- core.py # User seeder # Seeder haqida to'liq malumot boshqa pageda
        |-- serializers
            |-- auth.py
            |-- user.py
        |-- tasks
            |-- sms.py # Sms yuborish uchun celery task
        |-- tenplatetags
            |-- vite.py # frontend vite
        |-- views
            |-- auth.py
            |-- generics.py

Last updated