2 Commits

Author SHA1 Message Date
bf335946cd Merge pull request 'evalution app yaratildi' (#1) from feat/evaluation into main
Some checks failed
Deploy to Production / build-and-deploy (push) Has been cancelled
Reviewed-on: #1
2026-02-12 08:32:32 +00:00
Husanjonazamov
6c296857ae evalution app yaratildi 2026-02-12 13:31:49 +05:00
12 changed files with 24 additions and 31 deletions

View File

@@ -1,3 +1 @@
MODULES = [ MODULES = ["core.apps.shared", "core.apps.evaluation"]
"core.apps.shared",
]

View File

@@ -2,32 +2,26 @@
All urls configurations tree All urls configurations tree
""" """
from config.env import env
from django.conf import settings from django.conf import settings
from django.contrib import admin from django.contrib import admin
from django.http import HttpResponse from django.http import HttpResponse
from django.urls import include, path, re_path from django.urls import include, path, re_path
from django.views.static import serve from django.views.static import serve
from drf_spectacular.views import (SpectacularAPIView, SpectacularRedocView, from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
SpectacularSwaggerView)
from config.env import env
def home(request): def home(request):
return HttpResponse("OK") return HttpResponse("OK")
################
# My apps url
################
urlpatterns = [ urlpatterns = [
path("health/", home), path("health/", home),
path("api/v1/", include("core.apps.accounts.urls")), path("api/v1/", include("core.apps.accounts.urls")),
path("api/", include("core.apps.shared.urls")), path("api/", include("core.apps.shared.urls")),
path("api/", include("core.apps.evaluation.urls")),
] ]
################
# Library urls
################
urlpatterns += [ urlpatterns += [
path("admin/", admin.site.urls), path("admin/", admin.site.urls),
path("accounts/", include("django.contrib.auth.urls")), path("accounts/", include("django.contrib.auth.urls")),
@@ -35,29 +29,15 @@ urlpatterns += [
path("rosetta/", include("rosetta.urls")), path("rosetta/", include("rosetta.urls")),
path("ckeditor5/", include("django_ckeditor_5.urls"), name="ck_editor_5_upload_file"), path("ckeditor5/", include("django_ckeditor_5.urls"), name="ck_editor_5_upload_file"),
] ]
################
# Project env debug mode
################
if env.bool("SILK_ENABLED", False): if env.bool("SILK_ENABLED", False):
urlpatterns += [ urlpatterns += []
]
if env.str("PROJECT_ENV") == "debug": if env.str("PROJECT_ENV") == "debug":
################
# Swagger urls
################
urlpatterns += [ urlpatterns += [
path("schema/", SpectacularAPIView.as_view(), name="schema"), path("schema/", SpectacularAPIView.as_view(), name="schema"),
path("swagger/", SpectacularSwaggerView.as_view(url_name="schema"), name="swagger-ui"), path("swagger/", SpectacularSwaggerView.as_view(url_name="schema"), name="swagger-ui"),
path("redoc/", SpectacularRedocView.as_view(url_name="schema"), name="redoc"), path("redoc/", SpectacularRedocView.as_view(url_name="schema"), name="redoc"),
] ]
################
# Media urls
################
urlpatterns += [ urlpatterns += [
re_path(r"static/(?P<path>.*)", serve, {"document_root": settings.STATIC_ROOT}), re_path("static/(?P<path>.*)", serve, {"document_root": settings.STATIC_ROOT}),
re_path(r"media/(?P<path>.*)", serve, {"document_root": settings.MEDIA_ROOT}), re_path("media/(?P<path>.*)", serve, {"document_root": settings.MEDIA_ROOT}),
] ]

View File

View File

View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class ModuleConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "core.apps.evaluation"

View File

View File

View File

View File

@@ -0,0 +1,9 @@
from django.urls import path, include
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
urlpatterns = [
path("", include(router.urls)),
]

View File