Hello all,

   I got an error, and I don't know how to pass on it. I got this
error when I try to use ajax from django templates.
I use this, from jquery:
$('#create-user').click(function() {
                $( '#test_div' ).load( "{% url test_ajax %}");
        });

I have this button:
<button id="create-user" >Add a new operator</button>

I have this div:

<div id="test_div">
                <p>Test</p>
</div>

This is in urls.py:

url(r'^operators/', 'ibox2.operators.views.test_ajax1',
name='test_ajax'),

This is the view:

def test_ajax1( request ):
    if request.is_ajax():
            template = 'operators/operators_list.html'

            data = {

            }

            return render_to_response( template, data,
context_instance = RequestContext( request ) )

This is the operators_list.html:
<p>After Ajax</p>

Somebody get the same error, or know what I'm doing wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to