Skip to content

Commit b2d5681

Browse files
committed
full commit
1 parent 7590af2 commit b2d5681

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

core/asgi.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
"""
2-
ASGI config for config project.
3-
4-
It exposes the ASGI callable as a module-level variable named ``application``.
5-
6-
For more information on this file, see
7-
https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/
8-
"""
9-
101
import os
112

123
from django.core.asgi import get_asgi_application
134

14-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
5+
from dotenv import load_dotenv
6+
load_dotenv()
7+
8+
os.environ.setdefault(
9+
"DJANGO_SETTINGS_MODULE",
10+
os.getenv("DJANGO_SETTINGS_MODULE", "core.settings.development")
11+
)
1512

1613
application = get_asgi_application()
14+
15+
app = application

core/config/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from .apps import * # noqa
22
from .jwt import * # noqa
33
from .rest_framework import * # noqa
4+
from .unfold_navigation import * # noqa
5+
from .unfold import * # noqa

core/settings/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
}
6363

6464
WSGI_APPLICATION = "core.wsgi.application"
65+
ASGI_APPLICATION = "core.asgi.application"
6566

6667
AUTH_PASSWORD_VALIDATORS = [
6768
{

core/urls.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,20 @@
2323
}
2424

2525
# URLs
26-
urlpatterns = [
26+
urlpatterns = i18n_patterns(
2727
path("admin/", admin.site.urls),
2828
path("i18n", include("django.conf.urls.i18n")),
2929
path("", include("apps.blog.urls", namespace="blog")),
3030
path("users/", include("apps.users.urls", namespace="users")),
3131
path("robots.txt", TemplateView.as_view(template_name="bunin/robots.txt")),
32+
path("rosetta/", include("rosetta.urls")),
3233
path(
3334
"sitemap.xml",
3435
sitemap,
3536
{"sitemaps": sitemaps},
3637
name="django.contrib.sitemaps.views.sitemap",
3738
),
38-
]
39+
)
3940

4041
# API Endpoints
4142
urlpatterns += [

0 commit comments

Comments
 (0)