Commits

Anonymous committed f088f94

Comments (0)

Files changed (1)

 
 Django-Ajaxcomments uses decorators to enhance the functionality of the built-in comments app to support Ajax-based comment posting.
 
-The first decorator, {{{jsonify_if_ajax}}}, wraps the instances of {{{render_to_response}}} and {{{next_redirect}}} used by the comments app and checks to see if the request was submitted via Ajax.  If so, it checks for errors, and pushes a response to the Javascript callback function encoded in JSON.
+The first decorator, //jsonify_if_ajax//, wraps the instances of //render_to_response// and //next_redirect// used by the comments app and checks to see if the request was submitted via Ajax.  If so, it checks for errors, and pushes a response to the Javascript callback function encoded in JSON.
 
-The second decorator, {{{include_request}}} wraps the comments app's {{{post_comment}}} view.  Each time the view is called, the decorator rewraps the responses to give {{{jsonify_if_ajax}}} the current request object.
+The second decorator, //include_request// wraps the comments app's //post_comment// view.  Each time the view is called, the decorator rewraps the responses to give //jsonify_if_ajax// the current request object.
 
-The {{{post-comment.js}}} file handles the client-side interaction using jQuery.  If the Ajax request is unsuccessful (meaning the HTTP response status code was something other than 200), then the script unbinds itself from the form's submit event and pushes the comment through the standard non-Ajax interaction path so that the error can be handled normally.
+The //post-comment.js// file handles the client-side interaction using jQuery.  If the Ajax request is unsuccessful (meaning the HTTP response status code was something other than 200), then the script unbinds itself from the form's submit event and pushes the comment through the standard non-Ajax interaction path so that the error can be handled normally.
 
 == Requirements ==
 
 
 == Installation ==
 
-First, run the distutils setup script or manually copy the {{{ajaxcomments}}} folder into your PYTHONPATH:
+First, run the distutils setup script or manually copy the //ajaxcomments// folder into your PYTHONPATH:
 
 {{{
 #!bash
 $ python setup.py install
 }}}
 
-Next, add a line to your {{{settings.py INSTALLED_APPS}}} setting:
+Next, add a line to your //settings.py INSTALLED_APPS// setting:
 
 {{{
 #!python
 )
 }}}
 
-Copy the included media to your projects static media folder.  This typically goes under an {{{ajaxcomments}}} subdirectory:
+Copy the included media to your projects static media folder.  This typically goes under an //ajaxcomments// subdirectory:
 
 {{{
 #!bash
 $ cp -r ajaxcomments/media /mypath/myproject/media/ajaxcomments
 }}}
 
-Customize the {{{post-comment.js}}} file to fit your project's HTML structure.  You will likely want to edit the jQuery selectors used, and the HTML inserted in various places for the comment itself and the wait messages.  If you want to use the Gravatar functionality included within the script, make sure to download the [[http://plugins.jquery.com/project/md5|jQuery MD5]] plugin and include it in your project.
+Customize the //post-comment.js// file to fit your project's HTML structure.  You will likely want to edit the jQuery selectors used, and the HTML inserted in various places for the comment itself and the wait messages.  If you want to use the Gravatar functionality included within the script, make sure to download the [[http://plugins.jquery.com/project/md5|jQuery MD5]] plugin and include it in your project.
 
 Make sure that you link to the script within your template:
 
     type="text/javascript"></script>
 }}}
 
-Finally, for each page that you intend to use Ajaxcomments with, create a quick script to bind the submit event of the form to the {{{ajaxComment}}} function from {{{post-comment.js}}}:
+Finally, for each page that you intend to use Ajaxcomments with, create a quick script to bind the submit event of the form to the //ajaxComment// function from //post-comment.js//:
 
 {{{
 #!javascript
 });
 }}}
 
-If you are creating this as a separate script file and linking it to your template with a script tag, make sure that this script is loaded after the {{{post-comment.js}}} script, or you will get errors saying that ajaxComment() is undefined.
+If you are creating this as a separate script file and linking it to your template with a script tag, make sure that this script is loaded after the //post-comment.js// script, or you will get errors saying that ajaxComment() is undefined.
 
-You may also want to customize the {{{ajax-wait.gif}}} file so that it will fit in with the theme of your site.
+You may also want to customize the //ajax-wait.gif// file so that it will fit in with the theme of your site.
 
 If you experience issues, please feel free to file an issue and I'd be glad to help out!