Commit Graph

18 Commits

Author SHA1 Message Date
Awais Qureshi
f1f1933ab4 BOM-2374
Run Pyupgrade on edxmako.
2021-03-05 18:17:41 +05:00
usamasadiq
de99865eb6 Fix pep8 errors 2021-02-02 17:59:20 +05:00
usamasadiq
515458b9dc Applied pylint-amnesty 2021-02-02 17:59:20 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Aarif
765942d7d2 Updated the template loaders to make them compatible with django 1.11,2.0 and above 2020-03-28 13:27:38 +05:00
mraarif
ecdf2a3ebd updated the custom Loader to remove deprecated methods 2020-01-10 03:16:29 +05: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
Amit
328bcbe047 INCR-135: Run python-modernize on common/djangoapps/edxmako (#20483) 2019-05-09 10:08:57 -04:00
Jeremy Bowman
103c723c6d PLAT-1801 Preserve new user login behavior under Django 1.10+ 2017-12-05 10:20:25 -05:00
Jeremy Bowman
fdc50c3aa8 PLAT-1419 Make edxmako a proper template backend 2017-12-01 17:01:52 -05:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Matt Drayer
68312bdd2d Revert "Revert "saleem-latif/WL-328: Multi-Site Comprehensive Theming""
2. Update COMPREHNSIVE_THEME_DIR to COMPREHENSIVE_THEME_DIRS
3. Update paver commands to support multi theme dirs
4. Updating template loaders
5. Add ENABLE_COMPREHENSIVE_THEMING flag to enable or disable theming via settings
6. Update tests
7. Add backward compatibility for COMPREHEHNSIVE_THEME_DIR
2016-06-30 15:19:51 +05:00
Ned Batchelder
4f9f87c192 Fix encoding of Django-called Mako files to be safe
The old code set the output-encoding to None, which means, I want
Unicode strings as output.  This made Mako pass markupsafe objects to
"unicode()", which applied all the escaping.  Then the result would be
given to Django, would would html-escape it again, resulting in
over-escaping.

By setting the output-encoding to utf8, we use filters.encode.utf8
instead, which is aware of Markupsafe, which avoids the over-escaping.
2016-04-11 14:00:15 -04:00
Matjaz Gregoric
434f196550 Remove default django template loaders.
Mako filesystem/app_directories loaders already wrap default django template loaders.

Mako loaders delegate the `load_template_source` method to the base loader that
they wrap, so there's no reason to explicitly include the two django loaders in the settings.
2016-01-28 09:33:09 +01:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Ned Batchelder
a84735057d Move common/lib/*.py to openedx/core/lib
This makes these files importable, and puts them into the new best guess
as to where files should live.
2015-03-23 12:40:24 -04:00
stv
fb9f324f2f Fix PEP8: E303 too many blank lines 2014-11-10 11:00:14 -08:00
David Baumgold
8eff442752 mitxmako => edxmako 2013-12-03 14:15:09 -05:00