Using django: Django: How to access the model id’s within an AJAX script? on newest questions tagged django – Stack Overflow
I was wondering what is the correct approach,
Do I create HiddenInput fields in my ModelForm and from the
View I pass in the primaryKey for the models I am about to edit into
the hiddenInput fields and then grab those hiddenInput fields from
the AJAX script to use it like this?
item.load(
"/bookmark/save/" + hidden_input_field_1,
null,
function () {
$("#save-form").submit(bookmark_save);
}
);
Or is there is some more clever way of doing it and I have no idea?
Thanks
See Answers
source: http://stackoverflow.com/questions/11513023/django-how-to-access-the-model-ids-within-an-ajax-script
Using django: using-django
Recent Comments