From: Aditi Mittal Date: Tue, 24 Sep 2013 16:18:47 +0000 (+0530) Subject: Write docstringg for view functions. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=afff1492f89822d6c36fcad8b74953db2375cebf;p=mediagoblin.git Write docstringg for view functions. --- diff --git a/mediagoblin/media_types/blog/views.py b/mediagoblin/media_types/blog/views.py index aefbe52a..b8e1d845 100644 --- a/mediagoblin/media_types/blog/views.py +++ b/mediagoblin/media_types/blog/views.py @@ -50,8 +50,8 @@ from mediagoblin.notifications import add_comment_subscription @require_active_login def blog_edit(request): """ - View for editing the existing blog or automatically - creating a new blog if user does not have any yet. + View for editing an existing blog or creating a new blog + if user have not exceeded maximum allowed acount of blogs. """ url_user = request.matchdict.get('user', None) blog_slug = request.matchdict.get('blog_slug', None) @@ -59,7 +59,7 @@ def blog_edit(request): config = pluginapi.get_config('mediagoblin.media_types.blog') max_blog_count = config['max_blog_count'] form = blog_forms.BlogEditForm(request.form) - # the blog doesn't exists yet + # creating a blog if not blog_slug: if Blog.query.filter_by(author=request.user.id).count()