This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 253
Refactoring code for Django 4.2 #4073
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e3cd5e7
feat: add new migrations
mumarkhan999 7d44198
fix: django42 warnings.
awais786 6f119f8
fix: celery task issuue
mumarkhan999 88e5114
feat: add new migrations
mumarkhan999 1ee62a3
feat: add new migrations
mumarkhan999 c9daf3b
fix: update __init__ of core
mumarkhan999 cfad331
fix: update __init__ of refunds app
mumarkhan999 49fcb6a
fix: fix test_sdn file
mumarkhan999 ba7b3d4
fix: fix test files
mumarkhan999 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
pull_request: | ||
push: | ||
branches: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly this can also be changed to only following:
|
||
- master | ||
- '*' | ||
|
||
jobs: | ||
check_migrations: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
default_app_config = 'ecommerce.bff.config.BffConfig' # pragma: no cover | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
|
||
from django.conf.urls import include, url | ||
from django.urls import include, path | ||
|
||
urlpatterns = [ | ||
url(r'^payment/', include(('ecommerce.bff.payment.urls', 'payment'))), | ||
url(r'subscriptions/', include(('ecommerce.bff.subscriptions.urls', 'subscriptions'))) | ||
path('payment/', include(('ecommerce.bff.payment.urls', 'payment'))), | ||
path('subscriptions/', include(('ecommerce.bff.subscriptions.urls', 'subscriptions'))) | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
default_app_config = 'ecommerce.core.config.CoreAppConfig' # pragma: no cover | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
|
||
|
||
from django.conf.urls import url | ||
from django.urls import path, re_path | ||
|
||
from ecommerce.coupons import views | ||
|
||
urlpatterns = [ | ||
url(r'^offer/$', views.CouponOfferView.as_view(), name='offer'), | ||
url(r'^redeem/$', views.CouponRedeemView.as_view(), name='redeem'), | ||
url( | ||
path('offer/', views.CouponOfferView.as_view(), name='offer'), | ||
path('redeem/', views.CouponRedeemView.as_view(), name='redeem'), | ||
re_path( | ||
r'^enrollment_code_csv/(?P<number>[-\w]+)/$', | ||
views.EnrollmentCodeCsvView.as_view(), | ||
name='enrollment_code_csv' | ||
), | ||
url(r'^(.*)$', views.CouponAppView.as_view(), name='app'), | ||
re_path(r'^(.*)$', views.CouponAppView.as_view(), name='app'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
|
||
|
||
from django.conf.urls import url | ||
from django.urls import path, re_path | ||
|
||
from ecommerce.courses import views | ||
|
||
urlpatterns = [ | ||
url(r'^migrate/$', views.CourseMigrationView.as_view(), name='migrate'), | ||
url(r'^convert_course/$', views.ConvertCourseView.as_view(), name='convert_course'), | ||
path('migrate/', views.CourseMigrationView.as_view(), name='migrate'), | ||
path('convert_course/', views.ConvertCourseView.as_view(), name='convert_course'), | ||
|
||
# Declare all paths above this line to avoid dropping into the Course Admin Tool (which does its own routing) | ||
url(r'^(.*)$', views.CourseAppView.as_view(), name='app'), | ||
re_path(r'^(.*)$', views.CourseAppView.as_view(), name='app'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
|
||
|
||
from django.conf.urls import url | ||
from django.urls import re_path | ||
|
||
from ecommerce.core.constants import COURSE_ID_PATTERN | ||
from ecommerce.credit.views import Checkout | ||
|
||
urlpatterns = [ | ||
url(r'^checkout/{course}/$'.format(course=COURSE_ID_PATTERN), | ||
Checkout.as_view(), name='checkout'), | ||
re_path(r'^checkout/{course}/$'.format(course=COURSE_ID_PATTERN), Checkout.as_view(), name='checkout'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
|
||
|
||
from django.conf.urls import include, url | ||
from django.urls import include, path, re_path | ||
|
||
from ecommerce.enterprise import views | ||
|
||
OFFER_URLS = [ | ||
url(r'^$', views.EnterpriseOfferListView.as_view(), name='list'), | ||
url(r'^new/$', views.EnterpriseOfferCreateView.as_view(), name='new'), | ||
url(r'^(?P<pk>[\d]+)/edit/$', views.EnterpriseOfferUpdateView.as_view(), name='edit'), | ||
path('', views.EnterpriseOfferListView.as_view(), name='list'), | ||
path('new/', views.EnterpriseOfferCreateView.as_view(), name='new'), | ||
re_path(r'^(?P<pk>[\d]+)/edit/$', views.EnterpriseOfferUpdateView.as_view(), name='edit'), | ||
] | ||
|
||
urlpatterns = [ | ||
url(r'^offers/', include((OFFER_URLS, 'offers'))), | ||
url(r'^coupons/(.*)$', views.EnterpriseCouponAppView.as_view(), name='coupons'), | ||
path('offers/', include((OFFER_URLS, 'offers'))), | ||
re_path(r'^coupons/(.*)$', views.EnterpriseCouponAppView.as_view(), name='coupons'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
default_app_config = 'ecommerce.extensions.analytics.apps.AnalyticsConfig' # pragma: no cover | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,5 +40,5 @@ def process_view(self, request, view_func, view_args, view_kwargs): # pylint: d | |
# If the user does not already have an LMS user id, add it | ||
called_from = u'middleware with request path: {request}, referrer: {referrer}'.format( | ||
request=request.get_full_path(), | ||
referrer=request.META.get('HTTP_REFERER')) | ||
referrer=request.headers.get('referer')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can skip this change for now as both are supported with Django 42 |
||
user.add_lms_user_id('ecommerce_missing_lms_user_id_middleware', called_from) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
|
||
from django.conf.urls import include, url | ||
from django.urls import include, path | ||
|
||
urlpatterns = [ | ||
url(r'^v2/', include(('ecommerce.extensions.api.v2.urls', 'v2'))), | ||
path('v2/', include(('ecommerce.extensions.api.v2.urls', 'v2'))), | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change intentional? If yes, we can instead use only the headers to achieve the same purpose so following will work as well for all branches