Reformat render_to_response calls
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Sun, 5 Jun 2011 14:02:12 +0000 (16:02 +0200)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Sun, 5 Jun 2011 14:16:03 +0000 (16:16 +0200)
Just a simple indentation and ordering change, no
functional change.

mediagoblin/auth/views.py
mediagoblin/edit/views.py
mediagoblin/submit/views.py
mediagoblin/user_pages/views.py
mediagoblin/views.py

index a5112299f2fd831fd9a1ec1b0285a4c9c3945413..d54e673cfc618c785060fbb44d3a8134cbfc4645 100644 (file)
@@ -58,15 +58,14 @@ def register(request):
             return exc.HTTPFound(
                 location=request.urlgen("mediagoblin.auth.register_success"))
 
-    # render
-    return render_to_response(
-            request, 'mediagoblin/auth/register.html',
-            {'register_form': register_form})
+    return render_to_response(request,
+        'mediagoblin/auth/register.html',
+        {'register_form': register_form})
 
 
 def register_success(request):
-    return render_to_response(
-            request, 'mediagoblin/auth/register_success.html', {})
+    return render_to_response(request,
+        'mediagoblin/auth/register_success.html', {})
 
 
 def login(request):
@@ -100,12 +99,11 @@ def login(request):
             auth_lib.fake_login_attempt()
             login_failed = True
 
-    # render
-    return render_to_response(
-            request, 'mediagoblin/auth/login.html',
-            {'login_form': login_form,
-             'next': request.GET.get('next') or request.POST.get('next'),
-             'login_failed': login_failed})
+    return render_to_response(request,
+        'mediagoblin/auth/login.html',
+        {'login_form': login_form,
+         'next': request.GET.get('next') or request.POST.get('next'),
+         'login_failed': login_failed})
 
 
 def logout(request):
@@ -138,10 +136,10 @@ def verify_email(request):
     else:
         verification_successful = False
         
-    return render_to_response(
-            request, 'mediagoblin/auth/verify_email.html',
-            {'user': user,
-             'verification_successful': verification_successful})
+    return render_to_response(request,
+        'mediagoblin/auth/verify_email.html',
+        {'user': user,
+         'verification_successful': verification_successful})
 
 def verify_email_notice(request):
     """
@@ -150,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):
@@ -171,5 +169,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', {})
index ac286bec793567b42523f5aabb39ffa1aab60d8c..258f14e383006b9bfc939f5587a018ae44229e8b 100644 (file)
@@ -56,8 +56,7 @@ def edit_media(request, media):
                 location=request.urlgen("mediagoblin.user_pages.media_home",
                     user=media.uploader()['username'], media=media['slug']))
 
-    # render
-    return render_to_response(
-            request, 'mediagoblin/edit/edit.html',
-            {'media': media,
-             'form': form})
+    return render_to_response(request,
+        'mediagoblin/edit/edit.html',
+        {'media': media,
+         'form': form})
index a51e14e60a6f8eb3ea2a8d4c21645e540f240c43..95257b72205d89d8980bdb20735b21baa45b987c 100644 (file)
@@ -80,13 +80,11 @@ def submit_start(request):
             return exc.HTTPFound(
                 location=request.urlgen("mediagoblin.submit.success"))
 
-    # render
-    return render_to_response(
-            request, 'mediagoblin/submit/start.html',
-            {'submit_form': submit_form})
+    return render_to_response(request,
+        'mediagoblin/submit/start.html',
+        {'submit_form': submit_form})
 
 
 def submit_success(request):
-    # render
-    return render_to_response(
-            request, 'mediagoblin/submit/success.html', {})
+    return render_to_response(request,
+        'mediagoblin/submit/success.html', {})
index 0442e736199e26a98360b678c47c33a1763553f6..e2fbcc80791face9194d1ec324bd65dae68fe0bc 100644 (file)
@@ -42,19 +42,19 @@ def user_home(request, page):
     if media_entries == None:
         return exc.HTTPNotFound()
     
-    return render_to_response(
-            request, 'mediagoblin/user_pages/user.html',
-            {'user': user,
-             'media_entries': media_entries,
-             'pagination': pagination})
+    return render_to_response(request,
+        'mediagoblin/user_pages/user.html',
+        {'user': user,
+         'media_entries': media_entries,
+         'pagination': pagination})
 
 
 @get_user_media_entry
 def media_home(request, media):
     """'Homepage' of a MediaEntry()"""
-    return render_to_response(
-            request, 'mediagoblin/user_pages/media.html',
-            {'media': media})
+    return render_to_response(request,
+        'mediagoblin/user_pages/media.html',
+        {'media': media})
 
 
 ATOM_DEFAULT_NR_OF_UPDATED_ITEMS = 5
index dc2d45ba7ce51dc6dd130a2bb0e4efd2b8319521..22673d596127937ea6bd3c00439ed3964629d032 100644 (file)
@@ -21,6 +21,6 @@ def root_view(request):
     media_entries = request.db.MediaEntry.find(
         {u'state': u'processed'}).sort('created', DESCENDING)
     
-    return render_to_response(
-            request, 'mediagoblin/root.html',
-             {'media_entries': media_entries})
+    return render_to_response(request,
+        'mediagoblin/root.html',
+        {'media_entries': media_entries})