From 9038c9f9acc4cfa257a52def2b292e6142e7d86a Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 5 Jun 2011 15:41:08 -0500 Subject: [PATCH] I have a strong preference for aligning all parameters in a function call. --- mediagoblin/auth/views.py | 20 ++++++++++++-------- mediagoblin/edit/views.py | 3 ++- mediagoblin/submit/views.py | 7 ++++--- mediagoblin/user_pages/views.py | 6 ++++-- mediagoblin/views.py | 3 ++- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 36d23e53..94a62225 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -56,13 +56,15 @@ def register(request): return redirect(request, "mediagoblin.auth.register_success") - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/auth/register.html', {'register_form': register_form}) def register_success(request): - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/auth/register_success.html', {}) @@ -96,7 +98,8 @@ def login(request): auth_lib.fake_login_attempt() login_failed = True - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/auth/login.html', {'login_form': login_form, 'next': request.GET.get('next') or request.POST.get('next'), @@ -132,7 +135,8 @@ def verify_email(request): else: verification_successful = False - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/auth/verify_email.html', {'user': user, 'verification_successful': verification_successful}) @@ -144,8 +148,8 @@ def verify_email_notice(request): When the user tries to do some action that requires their account to be verified beforehand, this view is called upon! """ - return render_to_response(request, - 'mediagoblin/auth/verification_needed.html', {}) + return render_to_response( + request, 'mediagoblin/auth/verification_needed.html', {}) def resend_activation(request): @@ -164,5 +168,5 @@ def resend_activation(request): def resend_activation_success(request): - return render_to_response(request, - 'mediagoblin/auth/resent_verification_email.html', {}) + return render_to_response( + request, 'mediagoblin/auth/resent_verification_email.html', {}) diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py index 04b73567..c5f0f435 100644 --- a/mediagoblin/edit/views.py +++ b/mediagoblin/edit/views.py @@ -54,7 +54,8 @@ def edit_media(request, media): return redirect(request, "mediagoblin.user_pages.media_home", user=media.uploader()['username'], media=media['slug']) - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/edit/edit.html', {'media': media, 'form': form}) diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py index d4ecc75a..b409b64d 100644 --- a/mediagoblin/submit/views.py +++ b/mediagoblin/submit/views.py @@ -77,11 +77,12 @@ def submit_start(request): return redirect(request, "mediagoblin.submit.success") - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/submit/start.html', {'submit_form': submit_form}) def submit_success(request): - return render_to_response(request, - 'mediagoblin/submit/success.html', {}) + return render_to_response( + request, 'mediagoblin/submit/success.html', {}) diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index e2fbcc80..323c3e54 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -42,7 +42,8 @@ def user_home(request, page): if media_entries == None: return exc.HTTPNotFound() - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/user_pages/user.html', {'user': user, 'media_entries': media_entries, @@ -52,7 +53,8 @@ def user_home(request, page): @get_user_media_entry def media_home(request, media): """'Homepage' of a MediaEntry()""" - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/user_pages/media.html', {'media': media}) diff --git a/mediagoblin/views.py b/mediagoblin/views.py index 22673d59..3bff3974 100644 --- a/mediagoblin/views.py +++ b/mediagoblin/views.py @@ -21,6 +21,7 @@ def root_view(request): media_entries = request.db.MediaEntry.find( {u'state': u'processed'}).sort('created', DESCENDING) - return render_to_response(request, + return render_to_response( + request, 'mediagoblin/root.html', {'media_entries': media_entries}) -- 2.25.1