diff comments/views.py @ 693:ad69236e8501

For issue #52, update many 3rd party Javascript libraries. Updated to jquery 1.10.2, jquery ui 1.10.3. This broke a lot of stuff. - Found a newer version of the jquery cycle all plugin (3.0.3). - Updated JPlayer to 2.4.0. - Updated to MarkItUp 1.1.14. This also required me to add multiline attributes set to true on various buttons in the markdown set. - As per a stackoverflow post, added some code to get multiline titles in a jQuery UI dialog. They removed that functionality but allow you to put it back. Tweaked the MarkItUp preview CSS to show blockquotes in italic. Did not update TinyMCE at this time. I'm not using the JQuery version and this version appears to work ok for now. What I should do is make a repo for MarkItUp and do a vendor branch thing so I don't have to futz around diffing directories to figure out if I'll lose changes when I update.
author Brian Neal <bgneal@gmail.com>
date Wed, 04 Sep 2013 19:55:20 -0500
parents ee87ea74d46b
children 4619290d171d
line wrap: on
line diff
--- a/comments/views.py	Sun Sep 01 15:58:45 2013 -0500
+++ b/comments/views.py	Wed Sep 04 19:55:20 2013 -0500
@@ -1,10 +1,10 @@
 """
 Views for the comments application.
+
 """
 from django.contrib.auth.decorators import login_required
 from django.core.exceptions import ObjectDoesNotExist
 from django.http import HttpResponse
-from django.http import HttpResponseRedirect
 from django.http import HttpResponseBadRequest
 from django.http import HttpResponseForbidden
 from django.db.models import get_model
@@ -71,7 +71,7 @@
 
     comment = form.get_comment_object(request.user, request.META.get("REMOTE_ADDR", None))
 
-    # Check for spam 
+    # Check for spam
 
     if antispam.utils.spam_check(request, comment.comment):
         return HttpResponseForbidden(antispam.BUSTED_MESSAGE)
@@ -83,7 +83,7 @@
         'comment': comment,
         },
         context_instance = RequestContext(request))
-    
+
 
 @require_POST
 def flag_comment(request):
@@ -118,7 +118,7 @@
     """
     This function should be the target of an AJAX POST. It takes the 'data' parameter
     from the POST parameters and returns a rendered HTML page from the data, which
-    is assumed to be in markdown format. The HTML page is suitable for the preview 
+    is assumed to be in markdown format. The HTML page is suitable for the preview
     function for a javascript editor such as markItUp.
     """
     if not request.user.is_authenticated():