Commits

Brandon Konkle  committed 979812c

Cleaned up the whitespace in utils.py

  • Participants
  • Parent commits e4e4c1d

Comments (0)

Files changed (1)

File ajaxcomments/utils.py

 from django.shortcuts import render_to_response
 from django.contrib.comments.views.utils import next_redirect
 
-import logging
-
 def jsonify_if_ajax(func, request):
     """A decorator to intercept the details intended for the
     render_to_response and next_redirect functions, and encode them in JSON to
         if request.is_ajax():
             success = True
             json_errors = {}
-    
+            
             try:
                 form = args[1]['form']
-    
+                
                 if form.errors:
                     for error in form.errors:
                         json_errors.update({error: str(form.errors[error])})
             except TypeError:
                 pass
             
-            
             comment_html = None
             if 'c' in kwargs:
                 comment_html = render_to_string('comments/comment.html',
                                                 {'comment': Comment.objects.get(id=kwargs['c']) },
                                                 context_instance=RequestContext(request))
-
+            
             json_response = simplejson.dumps({
                 'success': success,
                 'errors': json_errors,
                 'html': comment_html,
             })
-    
+            
             return http.HttpResponse(json_response, mimetype="application/json")
         else:
             return func(*args, **kwargs)