aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/views.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix some unused imports and local variables.Ben Sturmfels2021-09-231-7/+4
|
* Remove remaining imports/calls to six not automatically removed by pyupgrade.Ben Sturmfels2021-03-051-3/+1
|
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-26/+25
|
* Merge remote-tracking branch 'gsoc2016/Subtitle-1'Boris Bobrov2018-07-101-2/+2
|\
| * Removed path_subtitle from edit/views.pysaksham11152016-07-261-1/+1
| |
| * Removed almost all of the code from coresaksham11152016-07-191-81/+1
| |
| * Only video uploader can edit their subtitlessaksham11152016-07-191-1/+3
| |
| * Only video owner can upload the subtitle for the videosaksham11152016-07-191-1/+2
| |
| * Saing subtitle after editsaksham11152016-07-191-1/+5
| |
| * Opening ths subtitle using absolute path and open functionsaksham11152016-07-191-3/+4
| |
| * Converting the path to subtitle into a tuplesaksham11152016-07-191-0/+3
| |
| * Cleaning upsaksham11152016-07-191-28/+2
| |
| * Customizing Subs using Wtformssaksham11152016-07-191-2/+18
| |
| * Loading subtitle files [Not working]saksham11152016-07-191-2/+3
| |
| * Path decoded and sent to html pagesaksham11152016-07-191-1/+9
| |
| * Made decorators views for Customize Interfacesaksham11152016-07-191-3/+6
| |
| * Customize Interface in progresssaksham11152016-07-191-0/+9
| |
| * Minor Changesaksham11152016-07-191-2/+2
| |
| * Subtitle built over attachments : workingsaksham11152016-07-191-0/+58
| |
* | 2 bug fixes in editor viewsĎÚβĨŐÚŚ Dod2018-06-281-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | * `WTForms` instances get `__init__`-ed with `defaults` as `kwargs`. The first arg is a `request.form` (which is what one must supply if this is a `POST` and must *not* supply otherwise). The content of that form (empty on `GET`) has higher priority than the defaults (which makes the user get an empty form). * Fix `edit_profile()` to allow changing `location` from a non-blank value to blank (i.e. removing the location). (cherry picked from commit 75f3e23b92392b9bd309fab4c1a52fd38d453627)
* | Fix #5513 - Can't delete blog post draftsayleph2017-08-151-0/+12
| | | | | | | | | | | | | | | | | | | | Modify the @get_media_entry_by_id decorator to return media regardless of processing state. Separately modify all view functions that use the @get_media_entry_by_id decorator to require that the media be in the processed state, other than for the media_confirm_delete view. This allows blog post drafts to be deleted without returning a 404. Further, it adds the ability to delete unprocessed media in the future, which would be a nice addition to the user processing panel.
* | Fix #5462 - attempt to change email without loginAndrew Browning2016-07-191-0/+1
|/ | | | | | Require an active login when accessing the form to change an email address associated with an account. This prevents a server crash when a user is assumed to be part of the request.
* Fix #5451 - add_message inconsistenciesAndrew Browning2016-04-021-17/+26
| | | | | Reformat add_message function calls for consistency and PEP8 line continuations.
* Fix issue 5367 Edit view updatesayleph2016-01-061-1/+1
| | | | | | | This commit fixes issue 5367 by updating the edit view to be compatible with recent db migrations. Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
* Fix bug on the OAuth client deauthorization pageJessica Tallon2015-12-201-1/+1
| | | | | | An exception was raised when a user tried to go to the authroization page this occured when we changed the field names on the models from "user" to actor. This patch corrects the query and resolves the error.
* Collection changes and migration for federationJessica Tallon2015-10-071-4/+4
| | | | | | | - 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
* Add the user models to the MODELS listJessica Tallon2015-07-311-1/+2
| | | | | | | | This adds the two new user models (LocalUser and RemoteUser) to the MODELS list that is in models.py. This stops the strange bug that occurs if you migrate a fresh database, the two models don't exist however migrating an existing database would create them as the migrations exist.
* Change codebase to query or create correct User modelJessica Tallon2015-07-311-3/+4
| | | | | | | The code base had many references to User.username and other specific to LocalUser attributes as that was the way it use to exist. This updates those to query on the generic User model but filtering by attributes on the LocalUser.
* Change all unicode() calls with six.text_type().Berker Peksag2015-06-251-2/+2
| | | | Fixes #5329.
* Fix #1007 - get location object not string of location name; caused 500 when ↵Jessica Tallon2014-10-271-1/+1
| | | | editing profile
* Merge branch 'location'Jessica Tallon2014-10-091-3/+18
|\ | | | | | | | | | | | | | | | | | | | | | | Add Location model which holds textual, geolocation coordiantes or postal addresses. This migrates data off Image model metadata onto the general Location model. It also adds the ability for location to be set on MediaEntry, User, MediaComment and Collection models. The geolocation plugin has been updated so that the location can be displayed in more general places rather than explicitely on the MediaEntry view. If GPS coordiantes are set for the User the profile page will also have the OSM provided by the geolocation plugin.
| * Add location model and migrationsJessica Tallon2014-10-091-3/+18
| |
* | Fix #549 - Deauthorize OAuth applicationsJessica Tallon2014-10-011-1/+29
| |
* | Fix iteritems usage on python 3Christopher Allan Webber2014-09-161-1/+1
| | | | | | | | This commit sponsored by Ben (Free Software Melbourne) Finney. Thanks!
* | Merge branch 'master' into merge-python3-portChristopher Allan Webber2014-09-161-1/+33
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Has some issues, will iteratively fix! Conflicts: mediagoblin/gmg_commands/__init__.py mediagoblin/gmg_commands/deletemedia.py mediagoblin/gmg_commands/users.py mediagoblin/oauth/views.py mediagoblin/plugins/api/views.py mediagoblin/tests/test_api.py mediagoblin/tests/test_edit.py mediagoblin/tests/test_oauth1.py mediagoblin/tests/test_util.py mediagoblin/tools/mail.py mediagoblin/webfinger/views.py setup.py
| * Cleaned up the code a little bittilly-Q2014-05-141-2/+2
| |
| * Tweaked the metadata edit screen to run jsonschema validators against the data.tilly-Q2014-05-141-9/+6
| |
| * Made some changes so that the metadata editing page works well with the updatedtilly-Q2014-05-121-21/+6
| | | | | | | | metadata tools.
| * Added in a few blank lines when a user edits the metadata of a file that hastilly-Q2014-05-061-0/+10
| | | | | | | | none.
| * Made it so the metadata editting page is only one step away from functioningtilly-Q2014-05-061-1/+15
| | | | | | | | correctly.
| * Created a UI for editting a media's metadata. Had to add a new macro totilly-Q2014-05-061-1/+16
| | | | | | | | wtforms.html in the process.
| * Created the media metadata editor pagetilly-Q2014-05-061-1/+12
| |
* | Use six.text_type instead of unicode().Berker Peksag2014-06-021-7/+9
|/ | | | I will be switch to use ``from __future__ import unicode_literals`` later.
* Merge remote-tracking branch 'refs/remotes/tilly-q/OPW-Moderation-Update'Christopher Allan Webber2013-10-071-3/+3
|\ | | | | | | | | | | | | Conflicts: mediagoblin/templates/mediagoblin/user_pages/user.html mediagoblin/tests/test_auth.py mediagoblin/tests/test_submission.py
| * Merge branch 'master' into OPW-Moderation-Updatetilly-Q2013-09-121-39/+59
| |\ | | | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py
| * | This has been an update to clean out the code a little bit. The primary changetilly-Q2013-08-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I made was I added the method has_privilege (which takes a variable amount of unicode privilege names as an argument) to the User model. This method allowed for much cleaner checks as to whether or not a user has a privilege. Other- wise, I also made it impossible for moderators to punish admins. I created a new url path and three new pages for Users to look at filed reports and the code of conduct for the mg instance. === Made reports on admins not resolvable by moderators: --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/moderation/report.html === Created new files for the new pages: --\ mediagoblin/meta/__init__.py --\ mediagoblin/meta/routing.py --\ mediagoblin/meta/views.py --\ mediagoblin/templates/mediagoblin/meta/code_of_conduct.html --\ mediagoblin/templates/mediagoblin/meta/reports_details.html --\ mediagoblin/templates/mediagoblin/meta/reports_panel.html --\ mediagoblin/routing.py --\ mediagoblin/static/css/base.css === Replaced vestigial methods of checking a user's privilege with the more ====== effective method has_privilege(u'privilege_name'): --\ mediagoblin/db/models.py --| Added in the has_privilege method to the User class --\ mediagoblin/db/migrations.py --\ mediagoblin/db/models.py --\ mediagoblin/decorators.py --\ mediagoblin/edit/lib.py --\ mediagoblin/edit/views.py --\ mediagoblin/gmg_commands/users.py --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/base.html --\ mediagoblin/templates/mediagoblin/user_pages/collection.html --\ mediagoblin/templates/mediagoblin/user_pages/media.html --\ mediagoblin/templates/mediagoblin/user_pages/user.html --\ mediagoblin/templates/mediagoblin/utils/collection_gallery.html --\ mediagoblin/user_pages/views.py === Minor UI changes --\ mediagoblin/templates/mediagoblin/moderation/report_panel.html --\ mediagoblin/templates/mediagoblin/moderation/user.html === Other Bugs: --\ mediagoblin/tools/response.py --\ mediagoblin/db/migrations.py
* | | Fixing import error after merge of basic_auth branch.Christopher Allan Webber2013-09-191-2/+3
| | | | | | | | | | | | This commit sponsored by geoffrey jost. Thank you!
* | | Merge remote-tracking branch 'refs/remotes/rodney757/auth_refactor'Christopher Allan Webber2013-09-191-41/+0
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Conflicts: mediagoblin/auth/views.py mediagoblin/edit/forms.py mediagoblin/templates/mediagoblin/edit/edit_account.html
| * | moved change_pass to basic_auth and fixed some typos with the moving of ↵Rodney Ewing2013-08-161-41/+0
| |/ | | | | | | forgot pass
* | didn't remove form.new_email when change email was moved to its own viewRodney Ewing2013-08-311-11/+7
| |