26 Commits

Author SHA1 Message Date
Taylor Payne
7111e8b18c refactor: bring common settings into common module (#37746) 2026-01-09 09:20:59 -07:00
Feanil Patel
0f7a7e5c98 feat: Drop unsupported service variants.
We haven't done anything specila for lms-xml for over a decade and we
dropped lms-preview support last year when we added preview capabality
to the new Authoring MFE.

https://github.com/openedx/edx-platform/pull/36460
2025-12-18 12:10:34 -05:00
Kyle McCormick
7a77652cd6 fix: devstack_docker -> devstack
In the context of edx-platform django settings,
devstack_docker is an alias to devstack. Both
are deprecated, technically, but we currently
want to remove all devstack-related settings files
except devstack.py (which tutor still uses). So,
in order to remove devstack_docker.py, we update
its references to devstack.py
2025-07-22 10:27:50 -04:00
David Ormsbee
c4f21b6931 fix: remove custom startup to fix dev reloading
The cms/startup.py and lms/startup.py files were created to
allow us to do a lot of custom initialization around things
like the ModuleStore, monkey-patching, adding MIME types to
our process, etc. As far back as 2017, we recognized that
this was a bad thing, marked these modules as "deprecated",
and started removing things or putting them in the standard
Django locations for them (0279181).

In its current state, these startup modules no longer do any
custom work, and just invoke django.startup(). But this is
meant for running Django code in "standalone" usage, e.g. if
you have a script that isn't a management command but needs
some Django functionality.

The "runserver" command used during development normally
launches a child process to serve requests and knows how to
kill and respawn that process when files are modified, so
that changes are reflected. It can also normally handle the
case where there's a SyntaxError in the child process, and
fixing that error will reload the code again.

Something about running django.startup() manually interferes
with this functionality in "runserver". It still reloads the
code in response to changes, but if the code gets into a
broken state for any reason (like a syntax error), the master
process itself dies. That causes the container to restart,
only to die again shortly afterwards in a loop until the
error is fixed. The container restarts will break any shell
you had opened into the container, as well as any IDE
integrations that connected to that container to access the
files and Python instance.

Getting rid of the custom startup code fixes this and moves
us one small step closer to being a more normal Django
project.
2025-02-28 23:16:05 -05:00
Kyle McCormick
25df9ca420 refactor: make safe_lxml an ordinary folder in openedx/core/lib (#25689) 2022-05-24 15:35:23 +05:00
Diana Huang
29548459fa refactor: Remove PyContracts usage. (#27887)
* refactor: Remove PyContracts usage.

We have not used PyContracts in a while and it is overhead we don't
need in edx-platform.

https://openedx.atlassian.net/browse/DEPR-147

* chore: Updating Python Requirements (#28018)

Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2021-06-23 18:24:06 -04:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Cory Lee
ac4845d052 DEPR-14 Remove AWS.py 2019-03-28 10:48:34 -04:00
Giovanni Cimolin da Silva
56820777c4 Change Django's configuration preference in manage.py
Signed-off-by: Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
2018-12-04 11:25:59 -02:00
Jeremy Bowman
1a67819ce4 PLAT-1945 Better management command ergonomics 2018-02-07 13:24:04 -05:00
Jeremy Bowman
5ca1a51460 PLAT-1350 Log Python warnings in production 2018-01-29 15:50:13 -05:00
Bill Filler
4fe5f3457d Conditionally display gated content in courseware
Display gated sections in course outline, navigation and in the course
when user has met prerequiste condition.

WL-1273, WL-1317
2018-01-18 12:34:19 -05:00
Ben Patterson
176770efad Revert "Enable PyContracts during tests"
This reverts commit 4312c0e763.
2015-05-22 15:05:11 -04:00
Calen Pennington
4312c0e763 Enable PyContracts during tests 2015-05-20 15:07:18 -04:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Adam
7e12e40164 Merge pull request #5532 from edx/adam/disable-pycontracts-on-startup
disable pycontracts except in development environments (PLAT-122)
2014-10-22 14:17:45 -04:00
Adam Palay
1aba7f81b4 disable pycontracts except in development environments (PLAT-122) 2014-10-15 13:22:24 -04:00
Usman Khalid
32c6dad526 Moved imports to manage.py and wsgi.py. 2014-10-14 18:27:31 +05:00
Calen Pennington
407b02b358 Centralize startup code, and execute in all contexts
Inspired by: http://eldarion.com/blog/2013/02/14/entry-point-hook-django-projects/
Moves startup code to lms.startup and cms.startup, and calls the startup
methods in wsgi.py and manage.py for both projects.
2013-08-27 12:12:20 -04:00
Carlos Andrés Rocha
e6288ad19c Fix manage.py to ouput the help of the django command if requested
Commands like the following were not working correctly:
```
$ python manage.py lms runserver --lms
```
2013-08-08 19:08:35 -04:00
Calen Pennington
1bcafd32a9 Make the service-variant flag on manage.py longform only 2013-07-25 09:34:51 -04:00
Calen Pennington
3e9bbe2550 Make cms.dev environment work with manage.py 2013-07-24 14:49:07 -04:00
Calen Pennington
76055aa211 Add a manage.py command that understands the extra edX options 2013-07-24 09:04:12 -04:00
Calen Pennington
5ba03130aa Moving LMS code into subdirectory 2012-06-06 14:09:01 -04:00
Piotr Mitros
9155eedda3 manage.py has execute permissions 2012-01-17 13:39:49 -05:00
Piotr Mitros
cc1de22e26 Initial commit 2011-12-07 09:28:16 -05:00