Commit Graph

25 Commits

Author SHA1 Message Date
Usama Sadiq
3949c73b35 fix: fix request.is_ajax() deprecation warning (#33055)
* fix: fix request.is_ajax() deprecation warning
2023-08-21 15:59:00 +05:00
M. Zulqarnain
41e5403f4e BOM-2369 (D): pyupgrade on contentstore/views (#26767)
* pyupgrade on contentstore/views

* Apply suggestions from code review

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-05 14:55:14 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +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
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
usama sadiq
720dcb6c3a Updated ExceptionViews handles
Added additional 'exception' parameter to function headers.
Disabled pylint warnings for missing docstring and unused arguments.
2020-01-10 15:56:24 +05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -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
Ayub khan
e9b3d8e8ec INCR-333 python3 compatibility 2019-07-09 14:19:16 +05:00
Gavin Sidebottom
67442c2641 Fixed unthemed error pages in Studio and LMS 2018-02-22 16:49:06 -05:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
Calen Pennington
93970f3473 Allow edxmako to be passed an explicit request to create the RequestContext from 2016-06-08 16:35:25 -04:00
Robert Raposa
f555ffd585 Refactor and improve js_utils helpers
- Rename escape_json_dumps to dump_js_escaped_json
- Rename escape_js_string to js_escaped_string
- Update js_escaped_string to output empty string for None
- Introduce dump_html_escaped_json
- Move dump_js_escaped_json after the pipe as new best practice
- Introduce additional uses of helpers
- Introduce new djangolib directory and move js_utils
2016-02-03 17:13:21 -05:00
Robert Raposa
3682fac832 Add json escaping to Studio
Make escaping for json simpler and more consistent in Mako templates
- add escape_json_dumps to escape and json.dumps
- add escape_js_str to escape javascript string
- refactor Studio to use escape_json_dumps in Mako templates

TNL-2646: Escape json.dumps
2015-11-04 13:34:42 -05:00
Sarina Canelake
c0556a7ef8 s/pylint: disable=W0613/pylint: disable=unused-argument/ 2014-12-01 11:22:11 -05:00
Sarina Canelake
e0f1d3f3f3 s/pylint: disable=C0111/pylint: disable=missing-docstring/ 2014-12-01 11:22:09 -05:00
Jay Zoldak
c5a7911b87 Fix pylint disable pragmas that were pep8 violations 2014-03-20 10:18:40 -04:00
David Baumgold
8eff442752 mitxmako => edxmako 2013-12-03 14:15:09 -05:00
David Baumgold
437e658f98 pylint fixes 2013-07-09 19:16:44 -04:00
David Baumgold
923bcc555c Make CMS errors JSON-able if requested via AJAX 2013-07-01 15:09:41 -04:00
Steve Strassmann
8bb6ad3689 relative imports 2013-05-13 11:31:56 -04:00
Steve Strassmann
979e3be174 fix pep8: imports and blank lines 2013-05-13 09:58:30 -04:00
Steve Strassmann
571a9af0c0 declared exports 2013-05-10 16:37:28 -04:00
Steve Strassmann
9350a2c067 refactoring views 2013-05-10 13:56:30 -04:00
Steve Strassmann
0bea50ede1 start refactoring views.py 2013-05-09 16:24:21 -04:00