<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using Django templates with jQuery AJAX</title>
	<atom:link href="http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/</link>
	<description>Django, Python, jQuery and whatever cool stuff I can think of</description>
	<lastBuildDate>Tue, 10 Aug 2010 17:27:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: joe</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-427</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Tue, 10 Aug 2010 17:27:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-427</guid>
		<description>Is there an easy reason why if I wrap the &#039;q&#039; and &#039;searchSubmit&#039; inputs inside of a form (to allow carriage return submission) that it stops working?</description>
		<content:encoded><![CDATA[<p>Is there an easy reason why if I wrap the &#8216;q&#8217; and &#8217;searchSubmit&#8217; inputs inside of a form (to allow carriage return submission) that it stops working?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-424</link>
		<dc:creator>Nizam</dc:creator>
		<pubDate>Fri, 30 Jul 2010 02:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-424</guid>
		<description>Here is the urls.py from the sample which can be downloaded here:

&lt;a href=&quot;http://www.nomadjourney.com/wp-content/uploads/2009/01/ajax_user_list.zip&quot; rel=&quot;nofollow&quot;&gt;http://www.nomadjourney.com/wp-content/uploads/2009/01/ajax_user_list.zip&lt;/a&gt;

&lt;code&gt;
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.contrib.auth.views import login, logout_then_login
from django.conf import settings
&lt;/code&gt;
&lt;code&gt;
from django.contrib import admin
admin.autodiscover()
&lt;/code&gt;
&lt;code&gt;
urlpatterns = patterns(&#039;&#039;,
    ( r&#039;^admin/(.*)&#039;, admin.site.root ),
    ( r&#039;^site_media/(?P&lt;path&gt;.*)$&#039;, &#039;django.views.static.serve&#039;, { &#039;document_root&#039;: settings.MEDIA_ROOT } ),
    ( r&#039;^demo/&#039;, include( &#039;demo.urls&#039; ) ),
)
&lt;/path&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Here is the urls.py from the sample which can be downloaded here:</p>
<p><a href="http://www.nomadjourney.com/wp-content/uploads/2009/01/ajax_user_list.zip" rel="nofollow">http://www.nomadjourney.com/wp-content/uploads/2009/01/ajax_user_list.zip</a></p>
<p><code><br />
from django.conf.urls.defaults import *<br />
from django.views.generic.simple import direct_to_template<br />
from django.contrib.auth.views import login, logout_then_login<br />
from django.conf import settings<br />
</code><br />
<code><br />
from django.contrib import admin<br />
admin.autodiscover()<br />
</code><br />
<code><br />
urlpatterns = patterns('',<br />
    ( r'^admin/(.*)', admin.site.root ),<br />
    ( r'^site_media/(?P
<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT } ),<br />
    ( r'^demo/', include( 'demo.urls' ) ),<br />
)
</path></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-421</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Sat, 17 Jul 2010 05:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-421</guid>
		<description>@ Peter and @Nizam. Great stuff guys! Thanks!</description>
		<content:encoded><![CDATA[<p>@ Peter and @Nizam. Great stuff guys! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Ganapolsky</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-419</link>
		<dc:creator>Igor Ganapolsky</dc:creator>
		<pubDate>Sun, 06 Jun 2010 21:39:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-419</guid>
		<description>I&#039;m really curious what your urls.py looks like.  I cannot get your example to work.</description>
		<content:encoded><![CDATA[<p>I&#8217;m really curious what your urls.py looks like.  I cannot get your example to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-398</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-398</guid>
		<description>Thank you Nizam. Helpful and neat !</description>
		<content:encoded><![CDATA[<p>Thank you Nizam. Helpful and neat !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NMarcu</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-348</link>
		<dc:creator>NMarcu</dc:creator>
		<pubDate>Fri, 04 Dec 2009 10:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-348</guid>
		<description>Hi,

    There is possible to update 2 divs with the same load function?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>    There is possible to update 2 divs with the same load function?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-286</link>
		<dc:creator>Nizam</dc:creator>
		<pubDate>Sun, 29 Nov 2009 03:44:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-286</guid>
		<description>Peter,

Thanks for sharing your experience using jQuery Taconite and Django together. Really good stuff! I&#039;ll have to steal this for my next project. ;)</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Thanks for sharing your experience using jQuery Taconite and Django together. Really good stuff! I&#8217;ll have to steal this for my next project. ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Rowell</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-284</link>
		<dc:creator>Peter Rowell</dc:creator>
		<pubDate>Sat, 28 Nov 2009 22:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-284</guid>
		<description>Nizam -

I had to do some Django/Ajax interaction on a site I did 2 years ago. We had a separate window called the Video Console and a large list of videos that could be displayed. Each video had a number of components: a URL to the FLV file, descriptive text, URLs to related products, etc. I was concerned about too much knowledge of the page layout being buried either in the back end or in the JS code for the AJAX handling.

Then I found the jQuery plugin called &#039;taconite&#039;! (Cue sounds of angels singing from on high.) See http://malsup.com/jquery/taconite/

I created a simple utility class to collect the various changes we wanted to make to the browser page. When you call the response() method it gives you a fully compliant XML/Taconite object wrapped in an HttpResponse object and ... everything &lt;i&gt;just works!&lt;/i&gt;

Between the taconite jQuery magic on the front, and the simplicity of building/rendering on the back, it&#039;s almost embarrassing how simple taconite makes doing AJAXy stuff. 

 I put a quick-and-dirty version of it at:
      http://techbuddy.us/taconite.py.txt</description>
		<content:encoded><![CDATA[<p>Nizam -</p>
<p>I had to do some Django/Ajax interaction on a site I did 2 years ago. We had a separate window called the Video Console and a large list of videos that could be displayed. Each video had a number of components: a URL to the FLV file, descriptive text, URLs to related products, etc. I was concerned about too much knowledge of the page layout being buried either in the back end or in the JS code for the AJAX handling.</p>
<p>Then I found the jQuery plugin called &#8216;taconite&#8217;! (Cue sounds of angels singing from on high.) See <a href="http://malsup.com/jquery/taconite/" rel="nofollow">http://malsup.com/jquery/taconite/</a></p>
<p>I created a simple utility class to collect the various changes we wanted to make to the browser page. When you call the response() method it gives you a fully compliant XML/Taconite object wrapped in an HttpResponse object and &#8230; everything <i>just works!</i></p>
<p>Between the taconite jQuery magic on the front, and the simplicity of building/rendering on the back, it&#8217;s almost embarrassing how simple taconite makes doing AJAXy stuff. </p>
<p> I put a quick-and-dirty version of it at:<br />
      <a href="http://techbuddy.us/taconite.py.txt" rel="nofollow">http://techbuddy.us/taconite.py.txt</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-160</link>
		<dc:creator>Nizam</dc:creator>
		<pubDate>Sun, 15 Nov 2009 01:22:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-160</guid>
		<description>@pulegium,

I just left a comment for your blog post. Thought that it might be the right place to continue the discussion.</description>
		<content:encoded><![CDATA[<p>@pulegium,</p>
<p>I just left a comment for your blog post. Thought that it might be the right place to continue the discussion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pulegium</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-158</link>
		<dc:creator>pulegium</dc:creator>
		<pubDate>Sat, 14 Nov 2009 12:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-158</guid>
		<description>Nizam, just to say thanks for this tutorial that inspired me to write smth similar using django and jquery (which i must admin i never used before!). Only difference is that your code acts upon user instruction (search query) whereas I use jquery to do gradual load of the page (displaying info as it becomes available). Below more details if anyone&#039;s interested:

http://www.grenadepod.com/2009/11/13/query-data-from-django-site-with-jquery/

Now I&#039;ve got one question. How would you go about passing information from the HTML back to the site? If you look at my example I use class to identify all objects I want to query and the id holds the object specific information. Again, I&#039;m total muppet when it comes to js/ajax stuff, so just wondering what would the best practises be in approaching this?

Cheers!</description>
		<content:encoded><![CDATA[<p>Nizam, just to say thanks for this tutorial that inspired me to write smth similar using django and jquery (which i must admin i never used before!). Only difference is that your code acts upon user instruction (search query) whereas I use jquery to do gradual load of the page (displaying info as it becomes available). Below more details if anyone&#8217;s interested:</p>
<p><a href="http://www.grenadepod.com/2009/11/13/query-data-from-django-site-with-jquery/" rel="nofollow">http://www.grenadepod.com/2009/11/13/query-data-from-django-site-with-jquery/</a></p>
<p>Now I&#8217;ve got one question. How would you go about passing information from the HTML back to the site? If you look at my example I use class to identify all objects I want to query and the id holds the object specific information. Again, I&#8217;m total muppet when it comes to js/ajax stuff, so just wondering what would the best practises be in approaching this?</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-155</link>
		<dc:creator>Nizam</dc:creator>
		<pubDate>Tue, 10 Nov 2009 05:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-155</guid>
		<description>Let me get this straight. You are getting the customer objects via AJAX/JSON from Django, right? Therefore you can use the &lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/models/querysets/#extra-select-none-where-none-params-none-tables-none-order-by-none-select-params-none&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;extra&lt;/code&gt;&lt;/a&gt; QuerySet API method to append an extra column for each row containing the URLs (possibly the value returned by the model instance&#039;s &lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/models/instances/#get-absolute-url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;get_absolute_url&lt;/code&gt;&lt;/a&gt; method) for each item before sending it back as a JSON response. Then you could use them as is from your jQuery code without any modification.</description>
		<content:encoded><![CDATA[<p>Let me get this straight. You are getting the customer objects via AJAX/JSON from Django, right? Therefore you can use the <a href="http://docs.djangoproject.com/en/dev/ref/models/querysets/#extra-select-none-where-none-params-none-tables-none-order-by-none-select-params-none" rel="nofollow"><code>extra</code></a> QuerySet API method to append an extra column for each row containing the URLs (possibly the value returned by the model instance&#8217;s <a href="http://docs.djangoproject.com/en/dev/ref/models/instances/#get-absolute-url" rel="nofollow"><code>get_absolute_url</code></a> method) for each item before sending it back as a JSON response. Then you could use them as is from your jQuery code without any modification.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sameer</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-154</link>
		<dc:creator>Sameer</dc:creator>
		<pubDate>Sun, 08 Nov 2009 15:45:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-154</guid>
		<description>Nizam, thanks for the quick reply.

No, &quot;customers.fields.id&quot; is not set in the template context. 

I am using Ajax/JSON to pass &quot;customer&quot; objects from the View to the Template (via jQuery).

Just to make things a bit more clear, finally what I am looking to achieve is to generate entire HTML UI using Ajax (via jQuery). For that I require the &quot;Customer&quot; objects which I am getting thru JSON. 

But the problem is, getting the URL for each customer object (for e.g. /cutomer/21). Ofcourse, I can hard code the URL such as &lt;code&gt;(&quot;/customer/&quot;+ &quot;Customer_ID&quot;)&lt;/code&gt;, but then it would be a very poor design decision &amp; quite cumbersome to maintain. That&#039;s why I require the reverse URL lookup to work at runtime inside an Ajax (jQuery) call.</description>
		<content:encoded><![CDATA[<p>Nizam, thanks for the quick reply.</p>
<p>No, &#8220;customers.fields.id&#8221; is not set in the template context. </p>
<p>I am using Ajax/JSON to pass &#8220;customer&#8221; objects from the View to the Template (via jQuery).</p>
<p>Just to make things a bit more clear, finally what I am looking to achieve is to generate entire HTML UI using Ajax (via jQuery). For that I require the &#8220;Customer&#8221; objects which I am getting thru JSON. </p>
<p>But the problem is, getting the URL for each customer object (for e.g. /cutomer/21). Ofcourse, I can hard code the URL such as <code>("/customer/"+ "Customer_ID")</code>, but then it would be a very poor design decision &amp; quite cumbersome to maintain. That&#8217;s why I require the reverse URL lookup to work at runtime inside an Ajax (jQuery) call.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-153</link>
		<dc:creator>Nizam</dc:creator>
		<pubDate>Sat, 07 Nov 2009 17:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-153</guid>
		<description>Sameer,

There isn&#039;t a way to have Django evaluate that url template tag from the client side. However, there is a way to get around this problem.

I am assuming that &lt;code&gt;customers.fields.id&lt;/code&gt; is set in the template context by your view. If so, you can do something like this in your template&#039;s JavaScript block:

&lt;code&gt;var customerID = {{ customers.fields.id }};&lt;/code&gt;

And then in the jQuery portion:

&lt;code&gt;$( &#039;#search_container&#039; ).html( &#039; &#039; ).load( &#039;{% url show_cust %}/&#039; + customerID + &#039;/&#039; );&lt;/code&gt;

And that should do the trick.</description>
		<content:encoded><![CDATA[<p>Sameer,</p>
<p>There isn&#8217;t a way to have Django evaluate that url template tag from the client side. However, there is a way to get around this problem.</p>
<p>I am assuming that <code>customers.fields.id</code> is set in the template context by your view. If so, you can do something like this in your template&#8217;s JavaScript block:</p>
<p><code>var customerID = {{ customers.fields.id }};</code></p>
<p>And then in the jQuery portion:</p>
<p><code>$( '#search_container' ).html( ' ' ).load( '{% url show_cust %}/' + customerID + '/' );</code></p>
<p>And that should do the trick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-152</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Sat, 07 Nov 2009 15:27:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-152</guid>
		<description>I am facing a similar issue...
Basically the question is, how do we do a URL lookup at run time using through jquery (ajax)?

Consider this code...

&lt;code&gt;$(document).ready( function() {
		$( &#039;#searchSubmit&#039; ).click( function() {
			searchstring = $( &#039;#searchstring&#039; ).val();
			var querystring = { q: searchstring };
			$.getJSON(&quot;/customer/srch/&quot;,querystring,
			function(data){
				$(&quot;#search_results&quot;).remove();
				// Add the search_results div to the container
				$(&quot;#search_container&quot;).append(&quot;&quot;);
				$.each(data, function(i, customers){
				 $( &#039;#search_container&#039; ).html( &#039; &#039; ).load( &#039;{% url show_cust customers.fields.id %}&#039; );
				});
			}
			);
			return false;
		});
	});&lt;/code&gt;


Here the 

&lt;code&gt;$( &#039;#search_container&#039; ).html( &#039; &#039; ).load( &#039;{% url show_cust customers.fields.id %}&#039; );&lt;/code&gt;

is throwing an error...

&lt;code&gt;Caught an exception while rendering: Reverse for &#039;show_cust&#039; with arguments &#039;(&#039;&#039;,)&#039; and keyword arguments &#039;{}&#039; not found.&lt;/code&gt;

This is so, because the value of customer_id is not known at first. But would only be known once the &quot;searchSubmit&quot; button has been clicked.  

How do I ask the django Templating language to only evaluate the url call at run time &amp; not at first page load?

I hope I have been clear in explaining the issue.

Thanks,
Sameer</description>
		<content:encoded><![CDATA[<p>I am facing a similar issue&#8230;<br />
Basically the question is, how do we do a URL lookup at run time using through jquery (ajax)?</p>
<p>Consider this code&#8230;</p>
<p><code>$(document).ready( function() {<br />
		$( '#searchSubmit' ).click( function() {<br />
			searchstring = $( '#searchstring' ).val();<br />
			var querystring = { q: searchstring };<br />
			$.getJSON("/customer/srch/",querystring,<br />
			function(data){<br />
				$("#search_results").remove();<br />
				// Add the search_results div to the container<br />
				$("#search_container").append("");<br />
				$.each(data, function(i, customers){<br />
				 $( '#search_container' ).html( ' ' ).load( '{% url show_cust customers.fields.id %}' );<br />
				});<br />
			}<br />
			);<br />
			return false;<br />
		});<br />
	});</code></p>
<p>Here the </p>
<p><code>$( '#search_container' ).html( ' ' ).load( '{% url show_cust customers.fields.id %}' );</code></p>
<p>is throwing an error&#8230;</p>
<p><code>Caught an exception while rendering: Reverse for 'show_cust' with arguments '('',)' and keyword arguments '{}' not found.</code></p>
<p>This is so, because the value of customer_id is not known at first. But would only be known once the &#8220;searchSubmit&#8221; button has been clicked.  </p>
<p>How do I ask the django Templating language to only evaluate the url call at run time &amp; not at first page load?</p>
<p>I hope I have been clear in explaining the issue.</p>
<p>Thanks,<br />
Sameer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-150</link>
		<dc:creator>Nizam</dc:creator>
		<pubDate>Fri, 06 Nov 2009 14:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-150</guid>
		<description>Marcu,

Is the jQuery snippet above inside of a Django template? If not, then the call to the &lt;code&gt;url&lt;/code&gt; template tag will not work. 

If it is within a Django template, then check your rendered HTML and see if the call to the &lt;code&gt;url&lt;/code&gt; template tag is working properly. You may also want to check for any unclosed template blocks (&lt;code&gt;{%&lt;/code&gt; or &lt;code&gt;%}&lt;/code&gt;).</description>
		<content:encoded><![CDATA[<p>Marcu,</p>
<p>Is the jQuery snippet above inside of a Django template? If not, then the call to the <code>url</code> template tag will not work. </p>
<p>If it is within a Django template, then check your rendered HTML and see if the call to the <code>url</code> template tag is working properly. You may also want to check for any unclosed template blocks (<code>{%</code> or <code>%}</code>).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NMarcu</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-149</link>
		<dc:creator>NMarcu</dc:creator>
		<pubDate>Wed, 04 Nov 2009 08:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-149</guid>
		<description>Hello, I need some help. I succed to run your exemple but when I do it on my project I got this error:
&quot;uncaught exception: Syntax error, unrecognized expression: %}&quot;

About my code:
This is from jquery: &lt;code&gt;$( &#039;#test_div&#039; ).html( &#039;&#160;&#039; ).load( &#039;{% url test_ajax %}&#039;);&lt;/code&gt;

I have created the &quot;#test_div&quot; on html page.
This is the view:
&lt;code&gt;def test_ajax1( request ):
    if request.is_ajax():
            template = &#039;operators/operators_list.html&#039;
            data = {
    	    }
            return render_to_response( template, data, context_instance = RequestContext( request ) )&lt;/code&gt;

This is the url:
&lt;code&gt;url(r&#039;^operators/&#039;, &#039;ibox2.operators.views.test_ajax1&#039;, name=&#039;test_ajax&#039;),&lt;/code&gt;

I have the operators_list.html template also created.

You know why I get this error?</description>
		<content:encoded><![CDATA[<p>Hello, I need some help. I succed to run your exemple but when I do it on my project I got this error:<br />
&#8220;uncaught exception: Syntax error, unrecognized expression: %}&#8221;</p>
<p>About my code:<br />
This is from jquery: <code>$( '#test_div' ).html( '&nbsp;' ).load( '{% url test_ajax %}');</code></p>
<p>I have created the &#8220;#test_div&#8221; on html page.<br />
This is the view:<br />
<code>def test_ajax1( request ):<br />
    if request.is_ajax():<br />
            template = 'operators/operators_list.html'<br />
            data = {<br />
    	    }<br />
            return render_to_response( template, data, context_instance = RequestContext( request ) )</code></p>
<p>This is the url:<br />
<code>url(r'^operators/', 'ibox2.operators.views.test_ajax1', name='test_ajax'),</code></p>
<p>I have the operators_list.html template also created.</p>
<p>You know why I get this error?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-145</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Tue, 13 Oct 2009 18:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-145</guid>
		<description>Take a look at the jQuery datatables plugin -- you&#039;ll find it very easy to work with, and it&#039;ll solve your row-creation problem, as well as others (sort, load, interaction) that you didn&#039;t realize you had.</description>
		<content:encoded><![CDATA[<p>Take a look at the jQuery datatables plugin &#8212; you&#8217;ll find it very easy to work with, and it&#8217;ll solve your row-creation problem, as well as others (sort, load, interaction) that you didn&#8217;t realize you had.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-133</link>
		<dc:creator>Nizam</dc:creator>
		<pubDate>Wed, 09 Sep 2009 15:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-133</guid>
		<description>Thomas,

I actually did mean to say jQuery. Don&#039;t get me wrong, jQuery is the most awesome JavaScript library out there. Its power is in DOM traversal. It obviously has a very robust DOM manipulation API as well. However, its weakness is in on the fly creation of DOM elements.

E.g., if I wanted to add rows to a &lt;code&gt;table&lt;/code&gt; element for instance, I&#039;d have to set a string variable with the HTML markup for the row and use &lt;code&gt;jQuery.append()&lt;/code&gt; to add it to the table. There is no way for me to add the row in a more programmatic kind of way. That&#039;s what I meant. Hope this clears this up.

-- Nizam</description>
		<content:encoded><![CDATA[<p>Thomas,</p>
<p>I actually did mean to say jQuery. Don&#8217;t get me wrong, jQuery is the most awesome JavaScript library out there. Its power is in DOM traversal. It obviously has a very robust DOM manipulation API as well. However, its weakness is in on the fly creation of DOM elements.</p>
<p>E.g., if I wanted to add rows to a <code>table</code> element for instance, I&#8217;d have to set a string variable with the HTML markup for the row and use <code>jQuery.append()</code> to add it to the table. There is no way for me to add the row in a more programmatic kind of way. That&#8217;s what I meant. Hope this clears this up.</p>
<p>&#8211; Nizam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas B. Higgins</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-131</link>
		<dc:creator>Thomas B. Higgins</dc:creator>
		<pubDate>Thu, 03 Sep 2009 19:17:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-131</guid>
		<description>Didn&#039;t you mean to say that &lt;i&gt;Django&#039;s&lt;/i&gt; built-in DOM manipulation features were a bit limited? In the example you have jQuery handling the display while Django handles the back end, which certainly seems advantageous to me if one is to have flexible DOM manipulation.</description>
		<content:encoded><![CDATA[<p>Didn&#8217;t you mean to say that <i>Django&#8217;s</i> built-in DOM manipulation features were a bit limited? In the example you have jQuery handling the display while Django handles the back end, which certainly seems advantageous to me if one is to have flexible DOM manipulation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nizam</title>
		<link>http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/comment-page-1/#comment-22</link>
		<dc:creator>Nizam</dc:creator>
		<pubDate>Fri, 24 Apr 2009 17:04:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.nomadjourney.com/?p=43#comment-22</guid>
		<description>Claudio,

I believe JavaScript has a built in function called encodeURIComponent( String ) which will encode a specific component of a URI. So the call to jQuery.load() above can be modified to the following to handle spaces and the like:

.load( &#039;{% url demo_user_search %}?q=&#039; + encodeURIComponent( q ) );

Here is a link which may be useful:

http://xkr.us/articles/javascript/encode-compare/</description>
		<content:encoded><![CDATA[<p>Claudio,</p>
<p>I believe JavaScript has a built in function called encodeURIComponent( String ) which will encode a specific component of a URI. So the call to jQuery.load() above can be modified to the following to handle spaces and the like:</p>
<p>.load( &#8216;{% url demo_user_search %}?q=&#8217; + encodeURIComponent( q ) );</p>
<p>Here is a link which may be useful:</p>
<p><a href="http://xkr.us/articles/javascript/encode-compare/" rel="nofollow">http://xkr.us/articles/javascript/encode-compare/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
