Commit Graph

45 Commits

Author SHA1 Message Date
edX requirements bot
bb20b17428 Python Requirements Update (#29516)
* chore: Updating Python Requirements

* fix: fix pylint issues

Co-authored-by: Mohammad Ahtasham ul Hassan <mohammad.ahtasham@arbisoft.com>
2021-12-08 14:13:27 +05:00
M. Zulqarnain
e54fb5f76e feat: New codemods on CMS (#28768) 2021-10-25 12:59:54 +05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
M. Zulqarnain
5562944e87 BOM-2369 (A): pyupgrade on api,contentstore and cms_user_tasks apps under CMS (#26676)
* pyupgrade on cms api,contentstore and cms_user_tasks apps
2021-03-04 15:06:07 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
Kyle McCormick
4dda73d797 [BD-14] Migrate all environments to use database-backed organizations (#25153)
* Install `organizations` app into LMS and Studio non-optionally.
* Add toggle `ORGANIZATIONS_AUTOCREATE` to Studio.
* Remove the `FEATURES["ORGANIZATIONS_APP"]` toggle.
* Use the new `organizations.api.ensure_organization` function to
  either validate or get-or-create organizations, depending
  on the value of `ORGANIZATIONS_AUTOCREATE`,
  when creating course runs and V2 content libraries.
  We'll soon use it for V1 content libraries as well.
* Remove the `util.organizations_helpers` wrapper layer
  that had to exist because `organizations` was an optional app.
* Add `.get_library_keys()` method to the Split modulestore.
* Add Studio management command for backfilling organizations tables
  (`backfill_orgs_and_org_courses`).

For full details, see
https://github.com/edx/edx-organizations/blob/master/docs/decisions/0001-phase-in-db-backed-organizations-to-all.rst

TNL-7646
2020-12-02 13:58:40 -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
Kyle McCormick
a3deb6e317 Sort imports in cms/
Command: `isort --recursive cms/`
2020-10-19 09:34:31 -04:00
Kyle McCormick
538dbf696b Import CMS code using fully qualified module names
or, using proper the proper Python 3 relative imports
(e.g., 'from .views import x') which are standard and
unambiguous.
2020-10-19 09:34:31 -04:00
Kyle McCormick
793df96332 Declare CMS apps using fully qualified names 2020-10-19 09:34:31 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Jeremy Bowman
e1d1c29c00 Fix DRF deprecation warnings (#23082)
Fix all deprecation warnings generated by Django REST Framework during the unit tests:

* ``The `base_name` argument is pending deprecation in favor of `basename`.`` (86 occurrences)
* `` `detail_route` is deprecated and will be removed in 3.10 in favor of `action`, which accepts a `detail` bool. Use `@action(detail=True)` instead.`` (18 occurrences)
2020-02-12 12:51:40 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
61e1eda20d Merge pull request #22644 from edx/feanil/2to3_imports
Run `2to3 -f future . -w`
2019-12-30 11:21:05 -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
Awais Qureshi
928a84f969 BOM-1117
Specifying a namespace in django.conf.urls.include() without providing an app_name is deprecated.
Adding the app_name attribute in the included module.
2019-12-30 18:08:21 +05:00
Waheed Ahmed
23bc5af0fc Fix course:org link creation upon rerun.
Upon rerun creation from publisher course:organization link
was not creating, due to which org logo was not appearing on
course certificates.

Fixed by creating course:org link upon rerun.

PROD-125
2019-08-05 13:48:50 +05:00
Dillon Dumesnil
e5fbfb02c6 DISCO-1222: Allow switching course numbers for reruns
Adds in tests for the new functionality while maintaining the old Validation Error message
2019-07-31 10:42:09 -04:00
aarif
e39485d94d ran python-modernize and isort on files mentioned in INCR-343
changes made to comply with quality
2019-07-16 11:54:40 +00:00
Ayub
1a9648a07e Revert "ran python-modernize and isort on files mentioned in INCR-343 (#21014)"
This reverts commit 87e58c86cc.
2019-07-15 16:44:13 +05:00
Aarif
87e58c86cc ran python-modernize and isort on files mentioned in INCR-343 (#21014) 2019-07-15 14:39:27 +05:00
Ned Batchelder
b3a731550c Fix problems that drf-yasg uncovered.
These were originally fixed individually, but had to be reverted, and
are now combined in one commit.  The originals were:

7b9040f6b0 This enum was backwards
8774ff1f9b Use ref_name to disambiguate serializers that drf-yasg would otherwise assume are the same.
8a44397139 Is this field missing because it is None?
4a1154a7ca Give a safer buffer for clearing the rate limiting
64c47856dd DRF 3.7.4 changed how you delegate to another view, so don't
7359ca4fb2 Is this right? It fixes two tests
fdd66e5390 Adjust the expected error message for DRF 3.7.7
9257f68fd8 The default TIME_ZONE should be UTC
2019-06-21 18:04:15 -04:00
Ned Batchelder
5dcb8bac33 Merge pull request #20802 from edx/revert-20393-nedbat/drf-yasg
Revert "Use drf-yasg for Open API documentation"
2019-06-11 16:34:21 -04:00
Amit
2f6935863a INCR-344 (#20785) 2019-06-11 16:11:46 -04:00
Ned Batchelder
39c7a2db7c Revert "Use drf-yasg for Open API documentation" 2019-06-11 16:05:00 -04:00
Ned Batchelder
7b9040f6b0 This enum was backwards 2019-06-10 15:27:39 -04:00
Awais Jibran
3bfab9fd32 Adding more timing logs as course-rerun is slow for mitx-7.00x 2019-03-22 15:41:57 +05:00
asadazam93
a4071324e0 Added logs 2019-03-12 16:55:00 +05:00
Matthew Piatetsky
7df30938c4 fix unicode strings in cms/ 2019-02-04 13:01:51 -05:00
Ned Batchelder
fae196a89b Don't use async as an identifier 2018-11-02 06:10:13 -04:00
Robert Raposa
fbc59231fc Update edx-drf-extensions to 2.0.0.
Note: this version update is backward incompatible.

ARCH-255
2018-10-17 01:00:34 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
rabia23
f65195c0ed EDUCATOR-2231 remove course run enrollment dates references from studio 2018-03-05 11:27:22 +00:00
Awais Jibran
1e16bfd936 On course run create request, validate course team user and raise validation error 2018-02-01 14:17:35 +05:00
Asad Azam
1f5134b5ef Fixed multiple CourseAccessRole error on publish 2017-12-28 15:42:41 +05:00
Clinton Blackburn
8a5782eb6e Updated Studio API to expose course run pacing type
The pacing type can now be read and updated.

EDUCATOR-1464
2017-10-04 10:16:45 -04:00
Clinton Blackburn
f4c08bbca1 Fixed Studio API bug with course team updates
The org field is now set on the CourseAccessRole object, since Studio expects that value to be present.

LEARNER-2469
2017-10-03 11:38:38 -04:00
Clinton Blackburn
5139b570ee Removed duplicated override of update_team method
LEARNER-2469
2017-10-03 11:38:38 -04:00
Clinton Blackburn
0334df1eb3 Fixed bug with Studio API course run team update endpoint
We now iterate over the given team members and create them individually, rather than in bulk. This avoids uniqueness errors that arise when we attempt a bulk create operation with an existing row.

LEARNER-2468
2017-09-28 12:24:23 -04:00
Clinton Blackburn
7d51c194a3 Updated Studio course run API endpoint to allow null enrollment dates
LEARNER-2469
2017-09-27 09:43:07 -04:00
Clinton Blackburn
4b9f017d4a Fixed bug for partial updates for Studio API course runs endpoint
Existing data remains intact when performing a partial update.

LEARNER-2468
2017-09-13 18:05:21 -04:00
Clinton Blackburn
f25674a606 Added pagination to Studio API course runs list endpoint
The viewset class has also been updated to inherit from GenericViewSet to better take advantage of existing DRF code.

LEARNER-2468
2017-09-13 16:39:05 -04:00
Clinton Blackburn
14b8c12e88 Added Studio API endpoint to update course image
LEARNER-2468
2017-09-13 11:22:47 -04:00
Clinton Blackburn
317f719d3c Added Studio API endpoint to re-run course runs
LEARNER-2470
2017-09-13 11:22:47 -04:00
Clinton Blackburn
256849950d Added Studio API endpoint to support course creation
LEARNER-2468
2017-09-13 11:22:47 -04:00