aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-11-13 17:25:33 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-11-13 17:25:33 -0600
commit5202924c91f987a025eba78eb9ca323600074495 (patch)
tree56ecbebf20097f6edd974d99f61c0c3b4c4950de
parentb7a8760b6d13ddfbe75831fefbb42448b2b1fae6 (diff)
downloadmediagoblin-5202924c91f987a025eba78eb9ca323600074495.tar.lz
mediagoblin-5202924c91f987a025eba78eb9ca323600074495.tar.xz
mediagoblin-5202924c91f987a025eba78eb9ca323600074495.zip
Docstring for submit_media()
This commit sponsored by Benjamin Prager. Thank you!
-rw-r--r--mediagoblin/submit/lib.py18
1 files changed, 18 insertions, 0 deletions
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()