Django with Jeditable: POST renders the whole page into table cell - django

use case:
user click on comment column to leave a comment.
comment is sent via post to the server.
server uploads to the database.
however instead of merely updating the page, Django puts my whole page into the into the table cell
before:
http://i50.tinypic.com/28cdkb7.jpg
after:
http://i45.tinypic.com/346vuag.jpg

http://formerlyconversal.wordpress.com/2009/11/01/inline-editing-with-jquery-jeditable-and-django/
you are probably looking for this.

Related

Manage ListView and CreateView on the same template: how to submit data and update listView without reloading the page?

I want user to be able to add new record form a page and the list of records, that would be on the same page above, be updated without reloading the page (see attached picture below)
For now, solutions I've read are to pass queryset (to display the list of records) in the context of createview
But this way, user will submit, and page reloaded, for each new records... As User may have to enter hundreds of records, it is not a satisfactory solution
so, maybe I should use Ajax to post new records and update the list of records
But I wonder if Django has an in-a-box solution to resolve this problem?

How to Fill Form with Data in DJango without Update

New to Django here. I have a link to a form in DJango. I use the CreateView to have the user enter the initial information. It all works great and the data is accurately saved to the database. My issue is this: I would like that same link to open the form (it's a one-to-one relationship) with the filled data so the user can see what they have previously entered and correct, edit or update as needed. The form currfently opens as a blank form so if the user has entered that information previously they are unable to see it. I cave researched get_or_create and update_or_create as well as a number of other topics, but can't seem to figure this out. This needs to be a user-friendly experience so multiple entires or clicking multiple buttons to access the data is not an option. How best can I implement this?
#Don you can checkout django formsets, I think this will help in this situation. And you can use a single FormView for all your needs by overriding its methods.
Have you looked at Django Sessions. It’s a simple way of saving session data and passing the data to future requests. https://docs.djangoproject.com/en/3.0/topics/http/sessions/. I. In your form view you cloud save the session data you want to pass to your next form. In your next form, you could use the session data as default values. I’ve done something similar in the past.

Django 1.4 wizard and tables2 navigation don't mix

We're using Django 1.4's new wizard to create, well, a wizard. We have a wizard where, a few steps into it, the user has to select a row from a listview/datagrid/table. We use Django-tables2 to show this data.
The problem is that django's wizard has a single fixed URL, and uses a hidden form field that tells the wizard at what step it is. So all forms submit via POST back to the very same URL, and Django's wizard figures out from which page the user comes, stores the submitted data and based on the hidden form field, figures out where to go next.
Django-tables2 is an HTML grid that supports paging and sorting through a set of data. However, it does so using http GET, passing some querystring variables to indicate what column to sort and/or what "page" of data to show.
As soon as we use sorting or paging in a tables2 grid inside a Django wizard, the GET will call the same URL, because it is a GET, the Django wizard will not receive the hidden form values it expects that regulates navigation, and it will happily show the first page of the wizard by default.
I'm wondering if anyone has experience with this and knows of a solution to keep both the Django Wizard as well as the Tables2 functional.
Thanks in advance,
Erik

django or extjs , encode another site post

i am working with openlayers, extjs , django
is there any way taking another site post and do sth. with django or extjs...
for exam. from another site you click button it sends xy coordinate and my main site will catch the data and add the xy data ...
when i click the link http://www.ppp.com/frmOL=OL&Point&x=36.555&y=33.665 will be create , i will cath the data ,encode and than add the data to map
thanks for your help
Just get the data from the query string, process it and add it to your database.

Django admin return to page after save

I have 3 pages of items listed in my django application admin. After i edit one of them (lets say it is in page 2) and save my changes, i return to page 1 of my listing. How can i make it so i return to the page the item is in?
I looked into some similar questions here at stackoverflow and i believe that i need to use javascript to send a httpresponse with the location header. But how i can determine the page the item is in?
any help is appreciated
You can find a code snippet in comments for this django ticket: http://code.djangoproject.com/ticket/3777