Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into update-django-storages
Browse files Browse the repository at this point in the history
  • Loading branch information
irtazaakram committed Oct 5, 2023
2 parents 6a3dcb3 + b4cda26 commit 2f4f9c9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 20 deletions.
20 changes: 1 addition & 19 deletions registrar/apps/api/v3/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import logging

from edx_api_doc_tools import query_parameter, schema_for
from edx_rest_framework_extensions.auth.jwt.authentication import (
JwtAuthentication,
)
Expand All @@ -20,24 +19,7 @@

logger = logging.getLogger(__name__)

SCHEMA_COMMON_RESPONSES = {
401: 'User is not authenticated.',
405: 'HTTP method not supported on this path.'
}


@schema_for(
'get',
parameters=[
query_parameter('org_key', str, 'Organization filter'),
query_parameter('user_has_perm', str, 'Permission filter'),
],
responses={
403: 'User lacks access to organization.',
404: 'Organization does not exist.',
**SCHEMA_COMMON_RESPONSES,
},
)

class ProgramListPaginationView(ProgramListView, TrackViewMixin, ListAPIView):
"""
A view for listing program objects.
Expand Down
3 changes: 2 additions & 1 deletion registrar/settings/devstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': os.environ.get('CACHE_LOCATION', 'memcached:11211'),
"OPTIONS": {"no_delay": True, "ignore_exc": True, "use_pooling": True},
}
}

Expand Down
2 changes: 2 additions & 0 deletions requirements/devstack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ pylint-plugin-utils==0.8.2
# -r requirements/local.txt
# pylint-celery
# pylint-django
pymemcache==4.0.0
# via -r requirements/nonlocal.txt
pymongo==3.13.0
# via
# -r requirements/local.txt
Expand Down
4 changes: 4 additions & 0 deletions requirements/monitoring/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,10 @@ pylint-plugin-utils==0.8.2
# -r requirements/monitoring/../test.txt
# pylint-celery
# pylint-django
pymemcache==4.0.0
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../production.txt
pymongo==3.13.0
# via
# -r requirements/monitoring/../devstack.txt
Expand Down
1 change: 1 addition & 0 deletions requirements/nonlocal.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

mysqlclient
python-memcached
pymemcache
2 changes: 2 additions & 0 deletions requirements/nonlocal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#
mysqlclient==2.2.0
# via -r requirements/nonlocal.in
pymemcache==4.0.0
# via -r requirements/nonlocal.in
python-memcached==1.59
# via -r requirements/nonlocal.in
six==1.16.0
Expand Down
2 changes: 2 additions & 0 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ pyjwt[crypto]==2.8.0
# edx-drf-extensions
# edx-rest-api-client
# social-auth-core
pymemcache==4.0.0
# via -r requirements/nonlocal.txt
pymongo==3.13.0
# via
# -r requirements/base.txt
Expand Down

0 comments on commit 2f4f9c9

Please sign in to comment.