Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #19

Merged
merged 9 commits into from
Nov 21, 2024
Merged

Main #19

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
full commit
RustamovAkrom committed Nov 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit b2d5681ece23650ae3fc40817ba1177155f62d2f
19 changes: 9 additions & 10 deletions core/asgi.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
"""
ASGI config for config project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/
"""

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
from dotenv import load_dotenv
load_dotenv()

os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
os.getenv("DJANGO_SETTINGS_MODULE", "core.settings.development")
)

application = get_asgi_application()

app = application
2 changes: 2 additions & 0 deletions core/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from .apps import * # noqa
from .jwt import * # noqa
from .rest_framework import * # noqa
from .unfold_navigation import * # noqa
from .unfold import * # noqa
1 change: 1 addition & 0 deletions core/settings/base.py
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@
}

WSGI_APPLICATION = "core.wsgi.application"
ASGI_APPLICATION = "core.asgi.application"

AUTH_PASSWORD_VALIDATORS = [
{
5 changes: 3 additions & 2 deletions core/urls.py
Original file line number Diff line number Diff line change
@@ -23,19 +23,20 @@
}

# URLs
urlpatterns = [
urlpatterns = i18n_patterns(
path("admin/", admin.site.urls),
path("i18n", include("django.conf.urls.i18n")),
path("", include("apps.blog.urls", namespace="blog")),
path("users/", include("apps.users.urls", namespace="users")),
path("robots.txt", TemplateView.as_view(template_name="bunin/robots.txt")),
path("rosetta/", include("rosetta.urls")),
path(
"sitemap.xml",
sitemap,
{"sitemaps": sitemaps},
name="django.contrib.sitemaps.views.sitemap",
),
]
)

# API Endpoints
urlpatterns += [