I type wrong in view.py, causing the problem. Have been solve this. On Nov 20, 2:32 am, Tsung-Hsien <jasoniem9...@gmail.com> wrote: > The error does not show on Django, but firebug shows the error. > I refer "Django 1.0 Web Site Development" and use the jQuery code > below: > > function bookmark_save() { > var item = $(this).parent(); > var data = { > url: item.find("#id_url").val(), > title: item.find("#id_title").val(), > tags: item.find("#id_tags").val(), > }; > $.post("/save/?ajax", data, function (result) { > if (result != "failure") { > item.before($("li", result).get(0)); > item.remove(); > $("ul.bookmarks .edit").click(bookmark_edit); > } > else { > alert("Failed to validate bookmark before > saving."); > } > }); > return false; > > } > > First, I encountered 403 error and added javascript code of official > document to solve the problem. > After 403 error, the 500 error shows on firebug as "NetworkError: 500 > INTERNAL SERVER ERROR -http://127.0.0.1:8000/save/?ajax". > The data can be updated, but the code as below doesn't action. > if (result != "failure") { > item.before($("li", result).get(0)); > item.remove(); > $("ul.bookmarks .edit").click(bookmark_edit); > } > else { > alert("Failed to validate bookmark before > saving."); > } > > How to solve this? > Thanks!!
-- 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.