gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s

This commit is contained in:
2026-04-15 08:59:36 +02:00
commit ab73d05ecc
359 changed files with 14415 additions and 0 deletions

3
routes/__init__.py Executable file
View File

@@ -0,0 +1,3 @@
from . import local, production, common
urlpatterns = local.urlpatterns + production.urlpatterns + common.urlpatterns

56
routes/common.py Executable file
View File

@@ -0,0 +1,56 @@
"""
All urls configurations tree
"""
from django.conf import settings
from django.contrib import admin
from django.http import HttpResponse
from django.urls import include, path, re_path
from django.views.static import serve
from routes.swagger import schema_view
def health(request):
return HttpResponse("OK: #e300e79ae3e5dbce142672f917cc1ff664810d8c")
urlpatterns = [
path("health/", health),
path("admin/", admin.site.urls),
path("rosetta/", include("rosetta.urls")),
path("accounts/", include("django.contrib.auth.urls")),
path(
"ckeditor5/",
include("django_ckeditor_5.urls"),
name="ck_editor_5_upload_file",
), # noqa
path("i18n/", include("django.conf.urls.i18n")),
# Internal apps
path("api/", include("core.apps.accounts.urls")),
path("", include("core.apps.home.urls")),
path("api/", include("core.apps.eggs.urls")),
# Media and static files
re_path(
r"static/(?P<path>.*)", serve, {"document_root": settings.STATIC_ROOT}
), # noqa
re_path(
r"media/(?P<path>.*)", serve, {"document_root": settings.MEDIA_ROOT}
), # noqa
# Swagger urls
path(
"swagger<format>/",
schema_view.without_ui(cache_timeout=120),
name="schema-json",
), # noqa
path(
"swagger/",
schema_view.with_ui("swagger", cache_timeout=120),
name="schema-swagger-ui",
), # noqa
path(
"redoc/",
schema_view.with_ui("redoc", cache_timeout=120),
name="schema-redoc",
), # noqa
]

10
routes/local.py Executable file
View File

@@ -0,0 +1,10 @@
"""
Local urls for debugging
"""
from django.urls import path
from django.urls import include
urlpatterns = [
path("debug", include("debug_toolbar.urls")),
]

5
routes/production.py Normal file
View File

@@ -0,0 +1,5 @@
"""
Production urls
"""
urlpatterns = []

20
routes/swagger.py Executable file
View File

@@ -0,0 +1,20 @@
"""
Swagger urls
"""
from drf_yasg import openapi
from rest_framework import permissions
from drf_yasg.views import get_schema_view
schema_view = get_schema_view(
openapi.Info(
title="Snippets API",
default_version="v1",
description="Test description",
terms_of_service="https://www.google.com/policies/terms/",
contact=openapi.Contact(email="JscorpTech@gmail.com"),
license=openapi.License(name="BSD License"),
),
public=True,
permission_classes=[permissions.AllowAny],
)