aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/api/tools.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix some unused imports and local variables.Ben Sturmfels2021-09-231-4/+3
|
* Apply pyupgrade --py36-plus.Ben Sturmfels2021-09-231-1/+1
| | | | This removes some 'u' prefixes and converts simple format() calls to f-strings.
* Remove remaining imports/calls to six not automatically removed by pyupgrade.Ben Sturmfels2021-03-051-1/+1
|
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-3/+3
|
* Collection changes and migration for federationJessica Tallon2015-10-071-5/+5
| | | | | | | - Adds a "type" column to the Collection object and allows the CollectionItem model to contain any object. - Changes "items" to "num_items" as per TODO - Renames "uploader", "creator" and "user" to a common "actor" in most places
* Use six.moves.urllib.parse instead of the urlparse module.Berker Peksag2014-05-261-1/+3
|
* Moves json_response into tools/json.pyxray72242013-07-111-24/+0
|
* plugins/api: fix for cross origin requestsRunar Petursson2013-02-201-1/+2
| | | | | | The response headers were never getting set because of a bug in the 7c552c0 commit. This expands the loop into a more readable form and results in the headers getting set.
* Added API testsJoar Wandborg2012-12-231-1/+1
|
* Convert return HttpException to raise HttpExceptionSebastian Spaeth2012-12-231-2/+2
| | | | | | controllers (view function) raise HttpException's and do not return them. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* plugins/api: webob.Response -> werkzeug.ResponseSebastian Spaeth2012-12-211-6/+4
|
* plugins/api: use headers.set(), not headers.update()Sebastian Spaeth2012-12-211-1/+1
| | | | | | | | | The werkzeug.Response().headers do not offer an update() method as the same key can be twice in the header 'dict'. Thus, iterate over the header keys and use header.set(key, value) which replaces an existing header key. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Transition webob.HttpForbidden to webob's exceptions ForbiddenSebastian Spaeth2012-12-211-3/+4
| | | | Also the BadRequest exception.
* Added client registration caps to OAuth pluginJoar Wandborg2012-09-211-6/+14
| | | | | | | | | | | | | | | | | | | THE MIGRATIONS SUPPLIED WITH THIS COMMIT WILL DROP AND RE-CREATE YOUR oauth__tokens AND oauth__codes TABLES. ALL YOUR OAUTH CODES AND TOKENS WILL BE LOST. - Fixed pylint issues in db/sql/migrations. - Added __repr__ to the User model. - Added _disable_cors option to json_response. - Added crude error handling to the api.tools.api_auth decorator - Updated the OAuth README. - Added client registration, client overview, connection overview, client authorization views and templates. - Added error handling to the OAuthAuth Auth object. - Added AuthorizationForm, ClientRegistrationForm in oauth/forms. - Added migrations for OAuth, added client registration migration. - Added OAuthClient, OAuthUserClient models. - Added oauth/tools with require_client_auth decorator method.
* Fixed validation in API post_entry.Joar Wandborg2012-09-171-0/+1
| | | | Added state to API get_entry_serializable
* API: Fixed media file URLs, limitsJoar Wandborg2012-09-151-4/+8
| | | | | - Added default limit and limit arg to get_entries - Fixed URL generation for BasicFileStorage files in API
* Added CORS headers to API json_responseJoar Wandborg2012-09-151-0/+5
|
* Added fields to /api/entries, wrote docstrings for api.toolsJoar Wandborg2012-09-151-5/+39
|
* Added /api/entries viewJoar Wandborg2012-09-151-1/+60
|
* Created API plugin, moved api_auth to the API pluginJoar Wandborg2012-09-131-0/+53