Hi, ALL,
This is my first post to this group so please bear with me for a sec.

I successfully installed django and followed the tutorial to create a 
project and an application.
It connects to my DB (mySQL) and everything is good.

Now in the part 3 of the tutorial I need to create a view.
I did create the URL in the appropriate place, but now I want to display my 
table with jQuery Grid.

So what I did is I downloaded the latest jQuery and placed it in the same 
html directory where my template is.
Now in the index.html I placed following code:

[code]
<script type="text/javascript" src="jquery-1.10.2.js">
      jQuery(document).ready(function() {
            jQuery("#grid").jqGrid({
                  url: "displayusbtable.py",
                  datatype: "local",
            }).navGrid("#gridpager");
     });
</script>
[/code]

My views.py have this code:
[code]
def displayusbtable(request):
     usb_list = USB.objects.all()
     t = loader.get_template('html/index.html')
     c = Context( { 'usb_list': usb_list, } )
     returns HttpResponse(t.render(c))
[/code]

Now when I try to go to "127.0.0.1:8000/usb" I see following message:

"GET /usb/jquery-1.10.2.js HTTP/1.1" 404 2063

Checking the "Developer Tools" in IE8, I see an error in my index.html:

Obect expected: line 8 character 5
Expected identifier, string or number: line 20
I think I need to make a "usb" folder somewhere, place the jquery.js file 
there and that's it. But I don't know where this folder should be located.

Could someone please help?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/75d1321f-ba3a-49ae-8967-8f88c9fe41dd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to