Skip to content

Commit

Permalink
feat: Convert contentserver to view permanently (drop middleware and …
Browse files Browse the repository at this point in the history
…flag) (#35420)

Final planned portion of #34702 -- waffle flag and middleware are removed.

Commits:

1. Feature change
    - Delete `content_server.use_view` waffle flag in favor of always using view
    - Delete the husk of `StaticContentServerMiddleware` and references to it
    - Update views module docstring
2. Refactor (move)
    - Move contentserver implementation into views.py
3. Lint cleanup
    - Fix import ordering (from refactor debris + amnestied lint)
  • Loading branch information
timmc-edx authored Sep 6, 2024
1 parent 8ddbf90 commit b615a87
Show file tree
Hide file tree
Showing 5 changed files with 350 additions and 414 deletions.
1 change: 0 additions & 1 deletion cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,6 @@
'openedx.core.djangoapps.cache_toolbox.middleware.CacheBackedAuthenticationMiddleware',

'common.djangoapps.student.middleware.UserStandingMiddleware',
'openedx.core.djangoapps.contentserver.middleware.StaticContentServerMiddleware',

'django.contrib.messages.middleware.MessageMiddleware',
'common.djangoapps.track.middleware.TrackMiddleware',
Expand Down
1 change: 0 additions & 1 deletion lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,6 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
'openedx.core.djangoapps.safe_sessions.middleware.EmailChangeMiddleware',

'common.djangoapps.student.middleware.UserStandingMiddleware',
'openedx.core.djangoapps.contentserver.middleware.StaticContentServerMiddleware',

# Adds user tags to tracking events
# Must go before TrackMiddleware, to get the context set up
Expand Down
368 changes: 0 additions & 368 deletions openedx/core/djangoapps/contentserver/middleware.py

This file was deleted.

Loading

0 comments on commit b615a87

Please sign in to comment.