aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/submit
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | 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.
* | | Leave slug empty until we are sure media processing was successful.Rodney Ewing2013-08-071-3/+0
| |/ |/| | | | | Patch submitted by LotusEcho
* | Patch by Strum. Ticket #451 - Convert all mongokit style .find, .find_one, ↵Rodney Ewing2013-07-111-3/+3
| | | | | | | | .one calls over to SQLAlchemy queries
* | fixes the inability to upload non ascii filenames, werkzeug strips all non ↵dunkyp2013-07-111-1/+6
| | | | | | | | | | | | ascii chars and returns an empty string. This checks if the filename contains non asciis and if it does generates a uuid for filename. Also the request version of filename is used for generating alternative title for upload cherry-picked from dunkyp. fixed conflicts and missing import.
* | New notificationsJoar Wandborg2013-06-091-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added request.notifications - Email configuration fixes - Set config_spec default SMTP port to `0` and switch to SSL/non-SSL default if `port == 0` - Added email_smtp_use_ssl configuration setting - Added migrations for notification tables - Added __repr__ to MediaComment(Mixin) - Added MediaComment.get_entry => MediaEntry - Added CommentSubscription, CommentNotification, Notification, ProcessingNotification tables - Added notifications.task to celery init - Fixed a bug in the video transcoder where pygst would hijack the --help argument. - Added notifications - views - silence - subscribe - routes - utility methods - celery task - Added half-hearted .active comment CSS style - Added quick JS to show header_dropdown - Added fragment template to show notifications in header_dropdown - Added fragment template to show subscribe/unsubscribe buttons on media/comment pages - Updated celery setup tests with notifications.task - Tried to fix test_misc tests that I broke - Added notification tests - Added and extended tests.tools fixtures - Integrated new notifications into media_home, media_post_comment views - Bumped SQLAlchemy dependency to >= 0.8.0 since we need polymorphic for the notifications to work
* Refactor submit util new_upload_entryElrond2013-05-212-4/+13
| | | | | | This tool creates an initial media entry for a given user. No magic. It just prefills the license with the user's default license and adds the user as uploader.
* Remove extra indentation left over from previous commit.Elrond2013-04-271-24/+24
| | | | | | | | This only removes an unneeded extra indentation, left over from the previous removal of code around. Extra commit so it is easy to check that it only changes indentation.
* Fix translations for collections and drop useless try.Elrond2013-04-271-7/+6
| | | | | | | | | | | | | | | | | | | Don't do: _("With some value: %s" % value) Please do: _("WIth some value: %s") % value Fixed for collection messages. Also removed a try: some_code. except Exception as e: raise No point in doing that. Fixing the indentation of some_code comes in an extra commit, because changing indentation is annoying enough alone, so don't mix it with other changes.
* Switching non-forms back to using normal pass_to_ugettextChristopher Allan Webber2013-04-241-1/+1
|
* Fix-bug-667-Use-lazy_pass_to_ugettext-for-forms.Aditi Mittal2013-04-242-2/+2
|
* mediagoblin/submit/lib.py: fix typoAlon Levy2013-04-231-1/+1
| | | | Signed-off-by: Alon Levy <alon@pobox.com>
* Merge remote-tracking branch 'JDShu/649_use_form_data_field'Elrond2013-03-301-6/+6
|\ | | | | | | | | | | | | | | | | | | * JDShu/649_use_form_data_field: Use WTForms data field in user_pages/views.py Use WTForms data field in auth/views.py auth: whitespace cleanup in views.py Use WTForms data field in plugins/oauth/views.py Use WTForms data field in submit/views.py Use WTForms data field in edit/views.py
| * Use WTForms data field in submit/views.pyHans Lo2013-03-271-6/+6
| |
* | Refactor file field checking.Elrond2013-03-292-5/+14
|/ | | | | When uploading, the file field needs some checks, it seems. So refactor them into check_file_field and use around.
* user.get('moo') -> user.mooSebastian Spaeth2013-01-221-1/+1
| | | | | | | User fields are always existent, so there is no need to .get() them, just use them directly. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Merge remote-tracking branch 'refs/remotes/spaetz/521_license_preference' ↵Christopher Allan Webber2013-01-221-1/+2
|\ | | | | | | into mergetest
| * Add a license preference fieldMark Holmquist2013-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This feature is absolutely necessary. Now a user can simply define their default license and quickly go through a form, as opposed to stopping to click on the select and choosing the same option over and over again. Also added DB migration for the field, so that's working now, too. Rebased by Sebastian and made the default value to be unicode. Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Don't pass request into run_process_mediaSebastian Spaeth2013-01-152-5/+12
| | | | | | | | | | | | | | | | | | People(tm) want to start run_process_media from the CLI and might not have a request object handy. So pass in the feed_url into run_process_media rather than the request object and allow the feed url to be empty (resulting in no PuSH notification at all then). Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Make PuSHing the Pubhubsubbub server an async task (#436, #585)Sebastian Spaeth2013-01-152-41/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notifying the PuSH servers had 3 problems.  1) it was done immediately after sending of the processing task to celery. So if celery was run in a separate process we would notify the PuSH servers before the new media was processed/ visible. (#436) 2) Notification code was called in submit/views.py, so submitting via the API never resulted in notifications. (#585) 3) If Notifying the PuSH server failed, we would never retry. The solution was to make the PuSH notification an asynchronous subtask. This way: 1) it will only be called once async processing has finished, 2) it is in the main processing code path, so even API calls will result in notifications, and 3) We retry 3 times in case of failure before giving up. If the server is in a separate process, we will wait 3x 2 minutes before retrying the notification. The only downside is that the celery server needs to have access to the internet to ping the PuSH server. If that is a problem, we need to make the task belong to a special group of celery servers that has access to the internet. As a side effect, I believe I removed the limitation that prevented us from upgrading celery. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* prepare_queue_task: Take app not request.Elrond2012-12-262-5/+8
| | | | | | | | | First rename prepare_entry to prepare_queue_task, because this is really more like what this thing does. Thanks to Velmont for noting that we do not need a request in here, but an "app" is good enough. Which means, that this stuff can be called from tool scripts too.
* Processing: Factor out prepare_entry.Elrond2012-12-262-25/+31
| | | | | prepare_entry handles the task_id setup and generating a queue filename and file. it returns the queue file.
* Factor out the actual calling of the processing.Elrond2012-12-262-21/+26
| | | | | | Calling the processing task and handling the exceptions is easy, but has a bunch of caveats, so factor it out into an easy callable function.
* upload refactor: push url handlingElrond2012-12-262-26/+52
| | | | | | Start to refactor our upload handling in main submit and the api. Start factoring out the handling of PuSH url handling.
* Remove mongo style .id = ObjectId()Elrond2012-12-241-4/+0
| | | | | On SQL we can't generate the primary key on our own. So just remove this stuff.
* Mongo removal: Remove the validate=True arg to obj.save()Elrond2012-12-241-2/+2
| | | | | all callers were forced to use validate=True anyway. So remove this useless stuff.
* Move things from routing.py to tools/routing.pyElrond2012-12-231-1/+1
| | | | | | | This stops a cyclic import. Move add_route, mount and endpoint_to_controller into tools/routing.py and change all callers.
* Move DBModel._id -> DBModel.idSebastian Spaeth2012-12-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | We were refering to model._id in most of the code base as this is what Mongo uses. However, each use of _id required a) fixup of queries: e.g. what we did in our find() and find_one() functions moving all '_id' to 'id'. It also required using AliasFields to make the ._id attribute available. This all means lots of superfluous fixing and transitioning in a SQL world. It will also not work in the long run. Much newer code already refers to the objects by model.id (e.g. in the oauth plugin), which will break with Mongo. So let's be honest, rip out the _id mongoism and live with .id as the one canonical way to address objects. This commit modifies all users and providers of model._id to use model.id instead. This patch works with or without Mongo removed first, but will break Mongo usage (even more than before) I have not bothered to fixup db.mongo.* and db.sql.convert (which converts from Mongo to SQL) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Added rudimentary route "mounting" w/ werkzeug routes; fixed auth routesChristopher Allan Webber2012-10-141-1/+1
| | | | | | auth routes fixes: - mounted the auth routes at /auth/ - removed crufty old verification email route
* Switched most stuff over from RoutesJoar Wandborg2012-10-141-7/+4
| | | | | | | | | | Removed the Routes routing functionality and replaced it with werkzeug.routes. Most views are functional. Known issues: - Translation integration with the request object is not yet figured out. This breaks 404 pages.
* Replaced all request.POST with request.form, ...Joar Wandborg2012-09-291-8/+8
| | | | | - Fixed error handling in OAuth plugin - Changed request.POST file fields to request.files
* Switch from webob.Request to werkzeug.wrappers.RequestJoar Wandborg2012-09-291-9/+9
|
* Added basic collection functionalityAaron Williamson2012-09-183-1/+58
|
* Fix docstring typo.Brett Smith2012-07-081-1/+1
|
* Merge remote-tracking branch 'joar/audio+sniffing'Joar Wandborg2012-03-271-7/+12
|\ | | | | | | | | | | | | | | Conflicts: mediagoblin/media_types/image/processing.py mediagoblin/media_types/video/__init__.py mediagoblin/media_types/video/processing.py mediagoblin/tests/test_submission.py
| * Changed media processing delegation to a 'sniffing' methodJoar Wandborg2012-02-151-3/+6
| | | | | | | | | | | | - Added sniff handlers to all media plugins All of them except audio returning False for ANYTHING at the moment.
* | remove unused `mg.submit.security' moduleJakob Kramer2012-03-232-27/+1
| |
* | Move celery task into own task.pyElrond2012-03-211-1/+2
| | | | | | | | | | | | Move the actual celery task from processing/__init__.py into its own .../task.py. That way it can be imported as needed.
* | Allow .id instead of ._id for the Mongo backendElrond2012-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | To allow easier migration to the SQLAlchemy style .id give the User and MediaEntry mongo classes an alias attribute of .id that maps to ['_id']. Use it in the upload process, because this was one of the last positions with a ['_id'] instead of ._id (due to a bug in mongokit).
* | Use task_id in generating the queue file pathElrond2012-02-211-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | The task_id is created anyway as a UUID. So it is very unique per definition. The only thing needed for the queue file path is a unique part. Before the objectid of the MediaEntry was used instead. But in the sql world the objectid is only available after an "insert" on the db. And creating the queue_file_path afterwards would require an "update" on the db. We can save that. ... for now.
* | Drop pre-rendered html: MediaEntry.description_htmlElrond2012-02-181-3/+1
|/ | | | | | | | | | | After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the MediaEntry.description_html part.