aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/submit
Commit message (Collapse)AuthorAgeFilesLines
* wtforms.fields.TextField was deprecatedJakob Kramer2015-03-121-3/+3
| | | | | | | WTForms documentation: > The TextField alias for StringField is deprecated. Signed-off-by: Berker Peksag <berker.peksag@gmail.com>
* Fix bug 647Boris Bobrov2015-03-021-1/+1
| | | | | Reading a file into memory resulted in depletion of memory. Now files are read and written lazily, by chunks.
* Add new hook for two-step media type checkingBoris Bobrov2015-02-161-13/+4
| | | | | | | | | | | | | | | | | Before uploaded media files were checked by extension. This led to situations when a plugin can support file with specific extension but doesn't due to lack of codecs, for example. Since the plugin reported that it supports uploaded file type, the upload was being declared successful, but transcoding failed. The failures were not easy to debug. The change adds a new hook that could allow two-step checking of the content. The result of the hook execution returns a tuple with media type name, manager and a callable sniffer, that can be used to perform probably expensive checks of the content. Also the change adds implementation of the hook for video.
* Fix #1054 - Add missing attributes to Activity.serializeJessica Tallon2014-12-081-2/+2
|
* Fix #1024 - Correctly set generator on ActivitiesJessica Tallon2014-12-021-2/+7
|
* Fix #1017 - Exception caused by activity being set on incorrect foreign keyJessica Tallon2014-10-291-8/+8
| | | | | | | | | | The .activity ForeignKey on several models such as MediaEntry expects a ActivityIntmediatory ID not an Activity ID however in submit code the activity attribute was being set the Activity, simply removing this assignment should fix the issue as everything is set correctly at this point. I have also moved the creation of the activity above the processing of media to avoid race conditions.
* Only create a slug after a media upload via the API when there is a titleJessica Tallon2014-10-221-3/+0
|
* Merge branch '905-activities'Jessica Tallon2014-10-071-0/+10
|\ | | | | | | | | | | Add Activity and Generator models which allow for activities to be created. This now works with the feed API.
| * Fix all the unit tests and clean up codeJessica Tallon2014-10-061-4/+6
| |
| * Create activity model and add activity creationJessica Tallon2014-08-221-0/+8
| | | | | | | | | | | | | | | | This creates the Activity and Genrator models from the Activity Streams spec and. I then created a migration which retro-actively create activities for media uploaded and comments created. Through out the code I've added so automatically activties are created when a user peforms an action (uploading media, commenting, etc.).
* | Merge branch 'master' into merge-python3-portChristopher Allan Webber2014-09-163-2/+73
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Tidy up federation code and add tests to cover more of the APIsJessica Tallon2014-08-181-6/+6
| |
| * Fix #927 - Clean up federation code after Elrond's reviewJessica Tallon2014-07-302-0/+69
| | | | | | | | | | | | | | | | - Add json_error and use inplace of json_response where appropriate. - Add garbage_collection to config spec file. - Fix bugs in both garbage collection task and test - Handle /api/whoami when no user logged in and a test for such a case. - Validate ID is correct and user has comment privilege to comment.
| * Fixes #899 : DeprecationWarning about Required going away in WTForms 3.0. ↵Loïc Le Ninan2014-06-131-1/+1
| | | | | | | | Replaced Required with InputRequired.
| * Fixed a small error relating to the default value of media_metadatatilly-Q2014-05-141-1/+1
| |
| * Made it possible to submit media with the metadata providedtilly-Q2014-04-211-1/+3
| |
* | Fix another tests.Berker Peksag2014-08-071-1/+1
| | | | | | | | (forgot to commit earlier)
* | Use six.text_type instead of unicode().Berker Peksag2014-06-022-8/+12
|/ | | | I will be switch to use ``from __future__ import unicode_literals`` later.
* Making the API make use of the new submit tooling.Christopher Allan Webber2013-11-141-2/+12
| | | | This commit sponsored by Zakkai Kauffman-Rogoff. Thanks! :)
* Pass in request.urlgen to submit_media so it can update the feed_url stuffChristopher Allan Webber2013-11-141-1/+2
| | | | This commit sponsored by Jesus Alberto Rodriguez Chavez. Thank you!
* Switching use of submit_media to be keyword arguments in views.py.Christopher Allan Webber2013-11-141-7/+8
| | | | | | | This should make things a bit easier for me to fiddle with argument ordering. This commit sponsored by Maira Sutton. Thanks!
* Breaking out get_upload_file_limits into its own utility.Christopher Allan Webber2013-11-142-12/+23
| | | | This commit sponsored by Mikael Nordfeldth. Thank you!
* A couple more adjustments for unicode'ification of some arguments.Christopher Allan Webber2013-11-141-2/+2
| | | | This commit sponsored by Bruno Girin. Thank you!
* Generic'ifying the submit code to not rely on the werkzeug FileStorage ↵Christopher Allan Webber2013-11-131-2/+2
| | | | | | | | datastructure Important, because that only makes sense for wsgi! :) This commit sponsored by Geoff Lehr. Thank you!
* Docstring for submit_media()Christopher Allan Webber2013-11-131-0/+18
| | | | This commit sponsored by Benjamin Prager. Thank you!
* Refactoring submission utility to make it more generic! Reusable!Christopher Allan Webber2013-11-132-120/+88
| | | | | This commit sponsored by Joar Wandborg. Joar, thanks for the many things you've done for MediaGoblin!
* Starting to split out a submit_media utilityChristopher Allan Webber2013-11-121-0/+82
|
* Merge remote-tracking branch 'refs/remotes/tilly-q/OPW-Moderation-Update'Christopher Allan Webber2013-10-071-1/+2
|\ | | | | | | | | | | | | 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-3/+7
| |\ | | | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py
| * | I did some more code-keeping in this commit. I added a lot of documentation, sotilly-Q2013-09-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that most of my functions do indeed have effective docstrings. I also changed the decorators so that they imply eachother in a logical way. I also modified the one decorator get_media_comment_by_id to be more usable with the variable urls of mediagoblin.user_pages.views:file_a_report. I also noticed a few tests had broken, so I went through them and fixed them up, finding that mostly there were problems in my actual writing of the tests. I also did a few other small tasks such as creating a new User method to check whether or not a User is ban- -ned. =============================================================================== Added in documentation =============================================================================== --\ mediagoblin/db/models.py --\ mediagoblin/decorators.py --\ mediagoblin/moderation/forms.py --\ mediagoblin/moderation/tools.py --\ mediagoblin/moderation/views.py --\ mediagoblin/user_pages/lib.py =============================================================================== Rearranged decorators to be more efficient =============================================================================== --\ mediagoblin/decorators.py --| Made it so that user_not_banned is encapsulated in require_active_login --| Made it so that require_active_login is encapsulated in user_has_privilege --| Changed get_media_comment_by_id into get_optional_media_comment_by_id. It | now returns valid code if the MediaComment id is absent. This makes it pos- | -sible to use this decorator for the function: | mediagoblin.user_pages.views:file_a_report --\ mediagoblin/user_pages/views.py --| Replaced the mediagoblin.user_pages.views:file_a_comment_report with the | decorator mentioned above --\ mediagoblin/user_pages/routing.py ----------------------------------------------------------- | took out unnecessary @user_not_banned decorators | ----------------------------------------------------------- --\ mediagoblin/submit/views.py --\ mediagoblin/user_pages/views.py =============================================================================== Fixed broken tests =============================================================================== --\ mediagoblin/tests/test_auth.py --\ mediagoblin/tests/test_privileges.py --\ mediagoblin/tests/test_submission.py =============================================================================== Fixed broken code =============================================================================== --\ mediagoblin/tools/response.py =============================================================================== Other Tasks =============================================================================== --\ mediagoblin/db/models.py --| Added in User.is_banned() method --\ mediagoblin/decorators.py --| Utitilized User.is_banned() method in the user_not_banned decorator --\ mediagoblin/moderation/views.py --| Made it impossible for an admin to ban themself. --| Got rid of a vestigial print statement --\ mediagoblin/templates/mediagoblin/base.html --| Made it so the top panel does not show up for users that are banned. --\ mediagoblin/templates/mediagoblin/moderation/user.html --| Rearranged the javascript slightly ===============================================================================
| * | This is a quick commit. I gave admins the ability to ban or unban userstilly-Q2013-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | straight from the moderation.users_detail page. I also changed the UserBan.expiration_date type from DateTime into Date. I also began work on the Terms of Service, pulled from another website (which will be cited clearly before I'm done). I added new tests as well for the ban/unbanning. Lastly, I added a few `user_not_banned` decorators to relevant views, so banned users cannot access any pages.
| * | Merge branch 'master' into OPW-Moderation-Updatetilly-Q2013-08-202-3/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/db/models.py mediagoblin/decorators.py mediagoblin/routing.py mediagoblin/user_pages/views.py
| * \ \ Merge branch 'ticket-679' into OPW-Moderation-Updatetilly-Q2013-07-291-4/+13
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/auth/tools.py mediagoblin/auth/views.py mediagoblin/db/migration_tools.py mediagoblin/db/migrations.py mediagoblin/db/models.py mediagoblin/decorators.py mediagoblin/user_pages/views.py
| * | | | This was a simple commit. I changed all references to Groups into Privileges sotilly-Q2013-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as to not conflict with the new federated groups which are also being written. I also fixed up some of the code in the user_in_group/user_has_privilege decor- ator. Users are now assigned the default privileges when they sign up, and ass- iged active once they are activated. I updated the gmg command makeadmin to use my groups as well. Lastly, I added the decorator to various views, requiring th- at users belong to appropriate groups to access pages. --\ mediagoblin/auth/tools.py --| Added code to assign new users to default privileges --\ mediagoblin/auth/views.py --| Added code to assign users to u'active' privilege once the email | verification is complete --\ mediagoblin/db/migrations.py --| Renamed Group class to Privilege class --\ mediagoblin/db/models.py --| Renamed Group class to Privilege class --\ mediagoblin/decorators.py --| Renamed function based on the Group->Privilege change --| Rewrote the function to be, ya know, functional --\ mediagoblin/gmg_commands/users.py --| Changed the 'makeadmin' command to add the target user to the admin | privilege group as well as affecting 'is_admin' column --\ mediagoblin/submit/views.py --| Added the requirement that a user has the 'uploader' privilege in order | to submit new media. --\ mediagoblin/user_pages/views.py --| Added the requirement that a user has the 'commenter' privilege in order | to make a comment. --| Added the requirement that a user has the 'reporter' privilege in order | to submit new reports. --| Got rid of some vestigial code in the file_a_report function.
* | | | | use media.get_uploader and fix typoRodney Ewing2013-08-261-1/+1
| | | | |
* | | | | javascript limit validationRodney Ewing2013-08-262-4/+12
| | | | |
* | | | | fix after rebaseRodney Ewing2013-08-261-2/+2
| | | | |
* | | | | max file sizeRodney Ewing2013-08-262-41/+60
| | | | |
* | | | | fixed tests and defaultsRodney Ewing2013-08-261-3/+1
| | | | |
* | | | | made no upload limit the defaultRodney Ewing2013-08-261-3/+3
| | | | |
* | | | | typosRodney Ewing2013-08-261-1/+1
| | | | |
* | | | | added testsRodney Ewing2013-08-261-7/+7
| | | | |
* | | | | added user upload limitsRodney Ewing2013-08-261-0/+34
| |_|_|/ |/| | |
* | | | Merge remote-tracking branch 'refs/remotes/rodney757/reprocessing'Christopher Allan Webber2013-08-211-3/+7
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | Conflicts: mediagoblin/processing/task.py mediagoblin/submit/lib.py
| * | | Fixing normal submission of media (well for images anyway)Christopher Allan Webber2013-08-161-1/+1
| | | |
| * | | Updating to the point where we can allllmost run with the new reprocessing codeChristopher Allan Webber2013-08-161-3/+5
| | | | | | | | | | | | | | | | This commit sponsored by Odin Hørthe Omdal. Thank you!
| * | | added image reprocessingRodney Ewing2013-08-161-3/+5
| | | |
* | | | -update to latest masterRodney Ewing2013-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | - have mg generate task_id remove
* | | | Tweak Celery TaskSebastian Spaeth2013-08-191-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make sure Exceptions are pickleable (not sure if this was not the case but this is the pattern as documented in the celery docs. - Don't create a task_id in the GMG code, but save the one implicitely created by celery. - Don't create a task-id directory per upload. Just store queued uploads in a single directory (this is the most controversial change and might need discussion!!!) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Revert "Leave slug empty until we are sure media processing was successful."Rodney Ewing2013-08-081-0/+3
| | | | | | | | | | | | | | | | | | | | | This reverts commit f67611fb485b5a84cedc62b73beb1e551e8cb934. For some reason, generating a slug here throws an integrity error during a query when there is a duplicate slug.