From: Christopher Allan Webber Date: Wed, 13 Nov 2013 23:25:33 +0000 (-0600) Subject: Docstring for submit_media() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5202924c91f987a025eba78eb9ca323600074495;p=mediagoblin.git Docstring for submit_media() This commit sponsored by Benjamin Prager. Thank you! --- diff --git a/mediagoblin/submit/lib.py b/mediagoblin/submit/lib.py index 9036c419..1df05978 100644 --- a/mediagoblin/submit/lib.py +++ b/mediagoblin/submit/lib.py @@ -88,6 +88,24 @@ def submit_media(mg_app, user, submitted_file, filename, upload_limit=None, max_file_size=None, # If provided we'll do the feed_url update, otherwise ignore urlgen=None): + """ + Args: + - mg_app: The MediaGoblinApp instantiated for this process + - user: the user object this media entry should be associated with + - submitted_file: the file-like object that has the + being-submitted file data in it (this object should really have + a .name attribute which is the filename on disk!) + - filename: the *original* filename of this. Not necessarily the + one on disk being referenced by submitted_file. + - title: title for this media entry + - description: description for this media entry + - license: license for this media entry + - tags_string: comma separated string of tags to be associated + with this entry + - upload_limit: size in megabytes that's the per-user upload limit + - max_file_size: maximum size each file can be that's uploaded + - urlgen: if provided, used to do the feed_url update + """ if upload_limit and user.uploaded >= upload_limit: raise UserPastUploadLimit()