Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt fi
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
# Make sure to compile files after any other files they include!
sed 's/Django<4.0//g' requirements/common_constraints.txt > tmp_con; cat tmp_con > requirements/common_constraints.txt; rm tmp_con
sed 's/Django<5.0//g' requirements/common_constraints.txt > tmp_con; cat tmp_con > requirements/common_constraints.txt; rm tmp_con
pip-compile --allow-unsafe --rebuild --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Generated by Django 4.2.21 on 2025-05-26 12:54

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('subsidy_request', '0014_learnercreditrequestconfiguration_and_more'),
]

operations = [
migrations.RenameIndex(
model_name='couponcoderequest',
new_name='subsidy_req_uuid_8c5efe_idx',
old_fields=('uuid', 'state'),
),
migrations.RenameIndex(
model_name='couponcoderequest',
new_name='subsidy_req_user_id_4e7462_idx',
old_fields=('user', 'enterprise_customer_uuid', 'state', 'course_id'),
),
migrations.RenameIndex(
model_name='licenserequest',
new_name='subsidy_req_uuid_e19871_idx',
old_fields=('uuid', 'state'),
),
migrations.RenameIndex(
model_name='licenserequest',
new_name='subsidy_req_user_id_ea0637_idx',
old_fields=('user', 'enterprise_customer_uuid', 'state', 'course_id'),
),
migrations.AlterField(
model_name='historicalsubsidyrequestcustomerconfiguration',
name='subsidy_type',
field=models.CharField(blank=True, choices=[('license', 'License Subsidy'), ('coupon', 'Coupon Subsidy'), ('learner_credit', 'Learner Credit Subsidy')], help_text='Which type of subsidy is used to grant access.', max_length=32, null=True),
),
migrations.AlterField(
model_name='subsidyrequestcustomerconfiguration',
name='subsidy_type',
field=models.CharField(blank=True, choices=[('license', 'License Subsidy'), ('coupon', 'Coupon Subsidy'), ('learner_credit', 'Learner Credit Subsidy')], help_text='Which type of subsidy is used to grant access.', max_length=32, null=True),
),
]
6 changes: 3 additions & 3 deletions enterprise_access/apps/subsidy_request/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ def bulk_update(cls, subsidy_requests, field_names, batch_size=SUBSIDY_REQUEST_B

class Meta:
abstract = True
index_together = [
['uuid', 'state'],
['user', 'enterprise_customer_uuid', 'state', 'course_id']
indexes = [
models.Index(fields=['uuid', 'state']),
models.Index(fields=['user', 'enterprise_customer_uuid', 'state', 'course_id']),
]


Expand Down
13 changes: 13 additions & 0 deletions enterprise_access/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,3 +577,16 @@ def root(*path_fragments):

CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
CRISPY_TEMPLATE_PACK = "bootstrap5"

STORAGES = {
'default': {
'BACKEND': 'django.core.files.storage.FileSystemStorage',
"OPTIONS": {
"location": MEDIA_ROOT,
"base_url": MEDIA_URL,
},
},
'staticfiles': {
'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage',
},
}
12 changes: 10 additions & 2 deletions enterprise_access/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@
# Unpack the media and files storage backend settings for django storages.
# These dicts are not Django settings themselves, but they contain a mapping
# of Django settings.
vars().update(FILE_STORAGE_BACKEND)
vars().update(MEDIA_STORAGE_BACKEND)
STORAGES = {
# this becomes the new DEFAULT_FILE_STORAGE
'default': MEDIA_STORAGE_BACKEND,
# pick an alias for your “other files” bucket
'files': FILE_STORAGE_BACKEND,
# you still need staticfiles here too
'staticfiles': {
'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage',
},
}

# Must be generated after loading config YAML because LOGGING_FORMAT_STRING might be overridden.
LOGGING = get_logger_config(format_string=LOGGING_FORMAT_STRING)
Expand Down
Empty file.
7 changes: 3 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ defusedxml==0.7.1
# via
# python3-openid
# social-auth-core
django==4.2.21
django==5.2.1
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
# crispy-bootstrap5
# django-celery-results
Expand Down Expand Up @@ -299,7 +298,7 @@ pyyaml==6.0.2
# drf-spectacular
# drf-yasg
# edx-django-release-util
redis==6.1.0
redis==6.2.0
# via -r requirements/base.in
referencing==0.36.2
# via
Expand Down Expand Up @@ -348,7 +347,7 @@ stevedore==5.4.1
# code-annotations
# edx-django-utils
# edx-opaque-keys
stripe==12.1.0
stripe==12.2.0
# via -r requirements/base.in
text-unidecode==1.3
# via python-slugify
Expand Down
2 changes: 1 addition & 1 deletion requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# this file from Github directly. It does not require packaging in edx-lint.

# using LTS django version
Django<5.0


# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
Expand Down
3 changes: 0 additions & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
# Common constraints for edx repos
-c common_constraints.txt

# For python greater than or equal to 3.9 backports.zoneinfo causing failures
backports.zoneinfo; python_version<'3.9'

# confluent-kafka 2.7.0 increased CPU usage
confluent-kafka<2.6.2

Expand Down
16 changes: 3 additions & 13 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ cryptography==45.0.3
# via
# -r requirements/validation.txt
# pyjwt
# secretstorage
# social-auth-core
ddt==1.7.2
# via -r requirements/validation.txt
Expand All @@ -155,7 +154,7 @@ distlib==0.3.9
# via
# -r requirements/validation.txt
# virtualenv
django==4.2.21
django==5.2.1
# via
# -r requirements/validation.txt
# crispy-bootstrap5
Expand Down Expand Up @@ -368,11 +367,6 @@ jaraco-functools==4.1.0
# via
# -r requirements/validation.txt
# keyring
jeepney==0.9.0
# via
# -r requirements/validation.txt
# keyring
# secretstorage
jinja2==3.1.6
# via
# -r requirements/validation.txt
Expand Down Expand Up @@ -597,7 +591,7 @@ readme-renderer==44.0
# via
# -r requirements/validation.txt
# twine
redis==6.1.0
redis==6.2.0
# via -r requirements/validation.txt
referencing==0.36.2
# via
Expand Down Expand Up @@ -641,10 +635,6 @@ rpds-py==0.25.1
# referencing
rules==3.5
# via -r requirements/validation.txt
secretstorage==3.3.3
# via
# -r requirements/validation.txt
# keyring
semantic-version==2.10.0
# via
# -r requirements/validation.txt
Expand Down Expand Up @@ -687,7 +677,7 @@ stevedore==5.4.1
# code-annotations
# edx-django-utils
# edx-opaque-keys
stripe==12.1.0
stripe==12.2.0
# via -r requirements/validation.txt
text-unidecode==1.3
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/django.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
django==4.2.21
django==5.2.1
7 changes: 3 additions & 4 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,8 @@ distlib==0.3.9
# via
# -r requirements/test.txt
# virtualenv
django==4.2.21
django==5.2.1
# via
# -c requirements/common_constraints.txt
# -r requirements/test.txt
# crispy-bootstrap5
# django-celery-results
Expand Down Expand Up @@ -541,7 +540,7 @@ pyyaml==6.0.2
# edx-django-release-util
readme-renderer==44.0
# via -r requirements/doc.in
redis==6.1.0
redis==6.2.0
# via -r requirements/test.txt
referencing==0.36.2
# via
Expand Down Expand Up @@ -636,7 +635,7 @@ stevedore==5.4.1
# doc8
# edx-django-utils
# edx-opaque-keys
stripe==12.1.0
stripe==12.2.0
# via -r requirements/test.txt
text-unidecode==1.3
# via
Expand Down
6 changes: 3 additions & 3 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ defusedxml==0.7.1
# -r requirements/base.txt
# python3-openid
# social-auth-core
django==4.2.21
django==5.2.1
# via
# -r requirements/base.txt
# crispy-bootstrap5
Expand Down Expand Up @@ -391,7 +391,7 @@ pyyaml==6.0.2
# drf-spectacular
# drf-yasg
# edx-django-release-util
redis==6.1.0
redis==6.2.0
# via -r requirements/base.txt
referencing==0.36.2
# via
Expand Down Expand Up @@ -456,7 +456,7 @@ stevedore==5.4.1
# code-annotations
# edx-django-utils
# edx-opaque-keys
stripe==12.1.0
stripe==12.2.0
# via -r requirements/base.txt
text-unidecode==1.3
# via
Expand Down
14 changes: 3 additions & 11 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ cryptography==45.0.3
# via
# -r requirements/test.txt
# pyjwt
# secretstorage
# social-auth-core
ddt==1.7.2
# via -r requirements/test.txt
Expand All @@ -148,9 +147,8 @@ distlib==0.3.9
# via
# -r requirements/test.txt
# virtualenv
django==4.2.21
django==5.2.1
# via
# -c requirements/common_constraints.txt
# -r requirements/test.txt
# crispy-bootstrap5
# django-celery-results
Expand Down Expand Up @@ -351,10 +349,6 @@ jaraco-context==6.0.1
# via keyring
jaraco-functools==4.1.0
# via keyring
jeepney==0.9.0
# via
# keyring
# secretstorage
jinja2==3.1.6
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -545,7 +539,7 @@ pyyaml==6.0.2
# edx-django-release-util
readme-renderer==44.0
# via twine
redis==6.1.0
redis==6.2.0
# via -r requirements/test.txt
referencing==0.36.2
# via
Expand Down Expand Up @@ -583,8 +577,6 @@ rpds-py==0.25.1
# referencing
rules==3.5
# via -r requirements/test.txt
secretstorage==3.3.3
# via keyring
semantic-version==2.10.0
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -624,7 +616,7 @@ stevedore==5.4.1
# code-annotations
# edx-django-utils
# edx-opaque-keys
stripe==12.1.0
stripe==12.2.0
# via -r requirements/test.txt
text-unidecode==1.3
# via
Expand Down
5 changes: 2 additions & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ dill==0.4.0
distlib==0.3.9
# via virtualenv
# via
# -c requirements/common_constraints.txt
# -r requirements/base.txt
# crispy-bootstrap5
# django-celery-results
Expand Down Expand Up @@ -470,7 +469,7 @@ pyyaml==6.0.2
# drf-spectacular
# drf-yasg
# edx-django-release-util
redis==6.1.0
redis==6.2.0
# via -r requirements/base.txt
referencing==0.36.2
# via
Expand Down Expand Up @@ -536,7 +535,7 @@ stevedore==5.4.1
# code-annotations
# edx-django-utils
# edx-opaque-keys
stripe==12.1.0
stripe==12.2.0
# via -r requirements/base.txt
text-unidecode==1.3
# via
Expand Down
Loading