Commit Graph

56 Commits

Author SHA1 Message Date
M. Zulqarnain
91d33611b1 refactor: pyupgrade in profile_images, programs, safe_sessions (#26953) 2021-03-22 17:51:13 +05:00
Aarif
cfcb9330b3 replaced unittest assertions pytest assertions (#26568) 2021-02-22 12:24:33 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
M. Zulqarnain
e159ab8e4d Pylint amnesty in openedx plugin_api, profile_images and programs apps (#26377) 2021-02-04 17:10:38 +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
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Manjinder Singh
cea795b02e Added new auth class (#23018)
* Added new auth class

- Created new class called OAuth2AuthenticationAllowInactiveUser, which replaces old class with same name
- Renames previous  OAuth2AuthenticationAllowInactiveUser to  OAuth2AuthenticationAllowInactiveUserDeprecated
- Replaced all imports of  OAuth2AuthenticationAllowInactiveUser to call deprecated class instead
- testing new class in discussion(added flag based on django setting)
2020-02-06 10:37:27 -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
Aarif
473398d410 Merge pull request #21792 from edx/BOM-743
BOM-743
2019-09-30 12:57:07 +05:00
aarif
62e26f1273 python 3 fixes 2019-09-26 19:06:12 +05:00
Awais Qureshi
fbd94fc289 BOM-627
Fixing python3
2019-09-20 15:03:02 +05:00
Jeremy Bowman
47292e5f92 Update StringIO usage for Python 3 (#20462) 2019-05-08 12:13:22 -04:00
Michael Youngstrom
0ab0f6bda8 run python-modernize openedx/core/djangoapps/profile_images 2019-03-28 09:51:19 -04:00
Douglas Hall
e442d2cf3e Add JwtAuthentication to user profile image API. 2019-03-04 17:42:29 -05:00
cclauss
c0c935b685 Old style exceptions --> new style for Python 3 2019-02-19 13:09:23 +01:00
Matthew Piatetsky
f294b1a374 fix unicode strings in openedx/ part 1 2019-02-13 10:47:35 -05:00
Michael Youngstrom
4bbd1dee0b Remove shards from commonlib-unit tests 2019-02-12 14:28:35 -05: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
Ahsan Ulhaq
ee7555e85f update usage of SessionAuthenticationAllowInactiveUser
LEARNER-6469
2018-10-01 17:52:52 +05:00
Jeremy Bowman
c290bf8a07 TE-2524 Stop using nose.plugins - openedx 2018-08-02 14:54:50 -04:00
Nimisha Asthagiri
ce4cb53672 Update Permissions to use latest edx-drf-extensions and rest_condition 2018-06-28 18:37:53 -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
Jeremy Bowman
5289c7e828 PLAT-1915 Stop using deprecated BaseException.message 2018-01-31 17:22:01 -05:00
bmedx
68e3894c17 openedx urls cleanup for Django 1.11
- Remove usage of django.urls.patterns
- Change urls tuples to lists
- Make all string view names callables
2017-11-03 16:11:41 -04:00
Troy Sankey
cc2fe585ec Remove PatchedClient, a django 1.4 shim. 2017-10-05 15:37:00 -04:00
John Eskew
7dfb6cc681 Change all UTC timezones to import from pytz instead of Django. 2017-10-05 11:12:52 -04:00
Mushtaq Ali
e8fee2e09a Add backend video image validations - EDUCATOR-45 2017-07-06 12:35:05 +05:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
J. Cliff Dyer
f33832a691 scoutrule: dedupe skip_unless_lms 2017-01-18 09:43:46 -05:00
Syed Hassan Raza
178e497c65 fix None value for orientation update 2016-11-04 16:48:25 +05:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Ned Batchelder
2e1238b83e Remove unused imports 2016-04-08 11:23:05 -04:00
Ben Patterson
c504029b39 Create a third shard for lms unit tests.
This will leverage the nose attrib plugin to allow us
to break tests apart on our build system to run
in parallel on separate nodes.
2016-03-17 12:01:42 -04:00
J. Cliff Dyer
2b6ae74885 fixup: dedupe test code. 2016-01-25 19:22:58 +00:00
J. Cliff Dyer
d5a96ee0ff Preserve EXIF orientation data for profile images.
When creating profile images from an uploaded file, ensure that EXIF
orientation information is preserved, so profile images appear
right-side-up.

https://openedx.atlassian.net/browse/MA-1559
2016-01-25 15:23:23 +00:00
muzaffaryousaf
1616de5051 Bookmarks API.
TNL-2180
2015-12-17 22:07:30 +05:00
Adam Palay
70552845ca fix translations for profile images (TNL-3901) 2015-12-14 08:19:00 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
J. Cliff Dyer
257dcc54f2 Accept raw image data as Content-type: image/*
MA-1416

Created a TypedFileUploadParser that validates the mimetype and then
takes the content and puts it on request.FILES['file'].  Subclasses the
existing FileUploadParser.

Use namedtuple in IMAGE_TYPES as per style guide:
https://github.com/edx/edx-platform/wiki/Python-Guidelines#classes-vs-dictionaries
2015-10-20 13:23:28 -04:00
Matt Drayer
1eab25f292 mattdrayer/increment-edx-lint: Bump to v0.2.9 and address pylint/pep8 violations
* Fix paver violations to stablize edx-lint update
* Parens, Line2Long
* Fix missing docstrings
* Fix PEP8 issues
* Address PR feedback (thanks @nedbat!)
2015-10-19 10:11:59 -04:00
J. Cliff Dyer
e200015cfc Make the profile_image api more restful. MA-1280
Deprecate the views at /api/profile_images/v1/{username}/upload and
/api/profile_images/v1/{username}/remove and replace them with GET and
POST methods at /api/user/v1/accounts/{username}/image
2015-10-01 18:39:24 +00:00
Will Daly
8555630df7 Upgrade djangorestframework to v3.1
* Upgrade edx-submissions
* Upgrade edx-ora2
* Upgrade edx-val
* Upgrade edx-proctoring
* Update all edx-platform code that depends on DRF, including:
  - auth_exchange
  - cors_csrf
  - embargo
  - enrollment
  - util
  - commerce
  - course_structure
  - discussion_api
  - mobile_api
  - notifier_api
  - teams
  - credit
  - profile_images
  - user_api
  - lib/api (OAuth2 and pagination)
2015-09-25 12:40:57 -04:00
Sylvia Pearce
eea3b31105 Delete white spaces that are causing test failures 2015-07-17 16:12:53 +00:00
Sylvia Pearce
d2b6ac84d3 Reorganize and update API documentation 2015-07-15 14:31:02 -04:00
Mark Hoeber
0df14f53d9 Profile Images API doc 2015-06-09 11:54:31 -04:00
muhammad-ammar
cfcb38c498 Update user message strings 2015-04-17 17:23:19 -04:00
cahrens
9907cb5251 Tests for profile image eventing. 2015-04-17 17:23:18 -04:00
Daniel Friedman
97c43adaa4 Track user settings changed events on User save 2015-04-17 17:23:18 -04:00