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

feat: create edx organization when updating course_org_filter DS-961 #209

Merged
merged 7 commits into from
Jun 6, 2024
Merged
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
3 changes: 2 additions & 1 deletion eox_tenant/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'eox_tenant'
'eox_tenant',
'organizations',
]

TIME_ZONE = 'UTC'
Expand Down
2 changes: 2 additions & 0 deletions eox_tenant/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import re

import six
from organizations.models import Organization

from eox_tenant.edxapp_wrapper.users import get_user_signup_source
from eox_tenant.models import TenantOrganization
Expand Down Expand Up @@ -104,3 +105,4 @@ def synchronize_tenant_organizations(instance):
for org in course_org_filter:
organization, _ = TenantOrganization.objects.get_or_create(name=org)
instance.organizations.add(organization)
Organization.objects.get_or_create(name=org, short_name=org)
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ edx-opaque-keys[django]
openedx_filters
social-auth-core
edx-drf-extensions
edx-organizations
30 changes: 25 additions & 5 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ backports-zoneinfo==0.2.1
# via
# django
# djangorestframework
certifi==2024.2.2
certifi==2024.6.2
# via requests
cffi==1.16.0
# via
Expand All @@ -20,7 +20,7 @@ charset-normalizer==3.3.2
# via requests
click==8.1.7
# via edx-django-utils
cryptography==42.0.7
cryptography==42.0.8
# via
# pyjwt
# social-auth-core
Expand All @@ -30,23 +30,32 @@ defusedxml==0.8.0rc2
# social-auth-core
django==4.2.13
# via
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
# django-crum
# django-model-utils
# django-mysql
# django-waffle
# djangorestframework
# drf-jwt
# edx-django-utils
# edx-drf-extensions
# edx-organizations
# jsonfield
# openedx-filters
django-crum==0.7.9
# via
# -r requirements/base.in
# edx-django-utils
django-model-utils==4.5.1
# via edx-organizations
django-mysql==4.13.0
# via -r requirements/base.in
django-simple-history==3.0.0
# via
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# edx-organizations
django-waffle==4.1.0
# via
# edx-django-utils
Expand All @@ -56,18 +65,24 @@ djangorestframework==3.15.1
# -r requirements/base.in
# drf-jwt
# edx-drf-extensions
# edx-organizations
dnspython==2.6.1
# via pymongo
drf-jwt==1.19.2
# via edx-drf-extensions
edx-django-utils==5.14.1
edx-django-utils==5.14.2
# via edx-drf-extensions
edx-drf-extensions==10.3.0
# via -r requirements/base.in
# via
# -r requirements/base.in
# edx-organizations
edx-opaque-keys[django]==2.9.0
# via
# -r requirements/base.in
# edx-drf-extensions
# edx-organizations
edx-organizations==6.13.0
# via -r requirements/base.in
idna==3.7
# via requests
jsonfield==3.1.0
Expand All @@ -82,6 +97,8 @@ openedx-filters==1.8.1
# via -r requirements/base.in
pbr==6.0.0
# via stevedore
pillow==10.3.0
# via edx-organizations
psutil==5.9.8
# via edx-django-utils
pycparser==2.22
Expand Down Expand Up @@ -116,9 +133,12 @@ stevedore==5.2.0
# via
# edx-django-utils
# edx-opaque-keys
typing-extensions==4.12.0
typing-extensions==4.12.1
# via
# asgiref
# edx-opaque-keys
urllib3==2.2.1
# via requests

# The following packages are considered to be unsafe in a requirements file:
# setuptools
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
# linking to it here is good.

Django<5

# Common constraints for Open edX repos
-c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
8 changes: 5 additions & 3 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ build==1.2.1
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==7.1.0
# via build
importlib-metadata==6.11.0
# via
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# build
packaging==24.0
# via build
pip-tools==7.4.1
Expand All @@ -24,7 +26,7 @@ tomli==2.0.1
# pip-tools
wheel==0.43.0
# via pip-tools
zipp==3.19.0
zipp==3.19.2
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down
35 changes: 30 additions & 5 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ backports-zoneinfo==0.2.1
# -r requirements/base.txt
# django
# djangorestframework
certifi==2024.2.2
certifi==2024.6.2
# via
# -r requirements/base.txt
# requests
Expand All @@ -34,7 +34,7 @@ click==8.1.7
# edx-django-utils
coverage==7.5.3
# via -r requirements/test.in
cryptography==42.0.7
cryptography==42.0.8
# via
# -r requirements/base.txt
# pyjwt
Expand All @@ -49,15 +49,18 @@ defusedxml==0.8.0rc2
dill==0.3.8
# via pylint
# via
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-crum
# django-model-utils
# django-mysql
# django-waffle
# djangorestframework
# drf-jwt
# edx-django-utils
# edx-drf-extensions
# edx-organizations
# jsonfield
# openedx-filters
django-crum==0.7.9
Expand All @@ -66,8 +69,17 @@ django-crum==0.7.9
# edx-django-utils
django-fake-model==0.1.4
# via -r requirements/test.in
django-model-utils==4.5.1
# via
# -r requirements/base.txt
# edx-organizations
django-mysql==4.13.0
# via -r requirements/base.txt
django-simple-history==3.0.0
# via
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.txt
# edx-organizations
django-waffle==4.1.0
# via
# -r requirements/base.txt
Expand All @@ -78,6 +90,7 @@ djangorestframework==3.15.1
# -r requirements/base.txt
# drf-jwt
# edx-drf-extensions
# edx-organizations
dnspython==2.6.1
# via
# -r requirements/base.txt
Expand All @@ -86,16 +99,21 @@ drf-jwt==1.19.2
# via
# -r requirements/base.txt
# edx-drf-extensions
edx-django-utils==5.14.1
edx-django-utils==5.14.2
# via
# -r requirements/base.txt
# edx-drf-extensions
edx-drf-extensions==10.3.0
# via -r requirements/base.txt
# via
# -r requirements/base.txt
# edx-organizations
edx-opaque-keys[django]==2.9.0
# via
# -r requirements/base.txt
# edx-drf-extensions
# edx-organizations
edx-organizations==6.13.0
# via -r requirements/base.txt
idna==3.7
# via
# -r requirements/base.txt
Expand Down Expand Up @@ -127,6 +145,10 @@ pbr==6.0.0
# via
# -r requirements/base.txt
# stevedore
pillow==10.3.0
# via
# -r requirements/base.txt
# edx-organizations
platformdirs==4.2.2
# via pylint
psutil==5.9.8
Expand Down Expand Up @@ -194,7 +216,7 @@ tomli==2.0.1
# via pylint
tomlkit==0.12.5
# via pylint
typing-extensions==4.12.0
typing-extensions==4.12.1
# via
# -r requirements/base.txt
# asgiref
Expand All @@ -205,3 +227,6 @@ urllib3==2.2.1
# via
# -r requirements/base.txt
# requests

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading