This is similar to use_read_replica_if_available(),
but it just returns either 'read_replica' or
'default', for use with the Django ORM using()
method. Syntactically, it fits nicer with queryset
method-call chains.
This is the first in a series of commits to create
a Python API for the LMS program_enrollments app.
We do some general refactoring, renaming, and clean-up
in order to move toward the creation of that API.
EDUCATOR-4321
* Update Financial Assistance logic
Use the zendesk proxy app instead of the unsupported zendesk library.
* Move to pre-fetching the group IDs.
Rather than making extra requests to zendesk to list all groups and find
a specific group ID. Just make a pre-filled list of group IDs for the
groups we care about. When a group name is passed in, it is checked
against this list and the ticket is created in the correct group so the
right people can respond to it.
* Remove old performance tests that we haven't been running.
As far as I can tell, these tests to capture HAR files were created 5
years ago and not being run as a part of our suite? They capture HAR
data that we do nothing with so even if they were running we should
remove them until we're ready to care about consuming this kind of
information.
* Update password test unicode string.
* Add ugettext translation helper function.
* Fix lambda syntax that is not valid in python 3.
* Fix ur raw strings which his not valid in python 3
* Use edx_six.get_gettext instead of ugettext.
* Fix a few other encoding issues.
* Don't use old form of sorted funciton.
This form which uses a 'cmp' method is not available in python 3.
Push notifications was only ever setup to connect to Parse.com a service
that has been discontinued. Since we haven't replaced the functionality
for a few years now, remove this dead code.
In cms/templates/js/course_info_update.underscore we're allowing content
to not be escaped because this is by design according to the tests.
Long term there should be a better fix for this but for now this is
intended behavior.
An @contextmanager will raise an exception from its yield statement if
an exception happens in the with-block that uses it. If the context
manager needs to do clean up, it should do it even if an exception is
raised, so it needs to be done in a finally clause.
relied on the old configuration values and old way of validating
passwords. Also improved registration page by always showing error
messages rather than hiding them on leaving the field.
the old validate password method and configuration values in favor of
AUTH_PASSWORD_VALIDATORS, a list of validators to use to check a
password. These include some that come straight from Django and some
that were written according to Django's specifications. This work also
included maintaining the current messaging as instruction text and
passing along restrictions for the password field.