Skip to content

Commit

Permalink
chore: upgrade django to 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
marslanabdulrauf committed Feb 12, 2025
1 parent 9c27790 commit ce588e3
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 284 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.20.2 as node
FROM node:16.20.2 AS node
ENV NODE_ENV=production
RUN apt-get update && apt-get install libelf1 -y
COPY . /src
Expand Down Expand Up @@ -30,7 +30,7 @@ RUN mkdir /var/media && chown -R mitodl:mitodl /var/media
# Poetry env configuration
ENV \
# poetry:
POETRY_VERSION=1.5.1 \
POETRY_VERSION=1.8.3 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR='/tmp/cache/poetry'

Expand Down
10 changes: 6 additions & 4 deletions cloudsync/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
URLs for cloudsync app
"""

from django.conf.urls import url
from django.urls import path, re_path

from cloudsync import views

urlpatterns = [
url(
r"^api/v0/tasks/(?P<task_id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$",
path(
"api/v0/tasks/<uuid:task_id>",
views.CeleryTaskStatus.as_view(),
name="celery-task-status",
),
url(r"api/v0/youtube-tokens/", views.YoutubeTokensView.as_view(), name="yt_tokens"),
re_path(
r"api/v0/youtube-tokens/", views.YoutubeTokensView.as_view(), name="yt_tokens"
),
]
9 changes: 7 additions & 2 deletions odl_video/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@
"django.contrib.messages",
"django.contrib.staticfiles",
"rest_framework",
"compat",
"hijack",
"hijack_admin",
"hijack.contrib.admin",
"encrypted_model_fields",
]

Expand All @@ -84,6 +83,7 @@
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"hijack.middleware.HijackUserMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
Expand Down Expand Up @@ -566,3 +566,8 @@ def get_all_config_keys():

OPENEDX_API_CLIENT_ID = get_string("OPENEDX_API_CLIENT_ID", "")
OPENEDX_API_CLIENT_SECRET = get_string("OPENEDX_API_CLIENT_SECRET", "")

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

# Hijack
HIJACK_INSERT_BEFORE = "</body>"
10 changes: 5 additions & 5 deletions odl_video/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.urls import include, path, re_path

urlpatterns = [
url(r"^admin/", admin.site.urls),
url(r"^", include("ui.urls")),
url(r"^", include("cloudsync.urls")),
url(r"^hijack/", include("hijack.urls", namespace="hijack")),
re_path(r"^admin/", admin.site.urls),
path("", include("ui.urls")),
path("", include("cloudsync.urls")),
path("hijack/", include("hijack.urls", namespace="hijack")),
]

handler403 = "ui.views.permission_denied_403_view"
Expand Down
Loading

0 comments on commit ce588e3

Please sign in to comment.