django - adding a button with parallel functionality

Roy Smith roy at panix.com
Sun Dec 8 16:27:22 EST 2013


In article <d099a464-6fa6-47a2-8eda-aa87223a0aeb at googlegroups.com>,
 chip9munk at gmail.com wrote:

> Hi all! I'll try to be clear and brief.
> 
> I have created a django project some months ago. It is an online survey.
> Now I want to add a button that when pressed adds something to a database, 
> but does not change any existing functionalities. 
> 
> Brief explanation:
> button will always be present at the pages with survey questions,
> when pressed it will simply add a page number (at which page user decided to 
> press the button) to a database, but the user will continue with the survey 
> as normal.
> (when the button is pressed, the view, template, questions at hand should not 
> change. Nothing changes for the survey subject!)
> 
> My question is how to simply add this button without interfering with the 
> survey.
> I do not need detailed instructions with models, views, templates, etc. just 
> brief idea if it is possible to do that without adding new view, reloading 
> view, adding forms etc...

Offhand, it sounds like you need a button wired up to some javascript 
which fires off an asynchronous HTTP request.  But, since you haven't 
really described anything about the structure of your application, 
that's just a wild guess.

Almost certainly, the real answer has nothing to do with Python, however.



More information about the Python-list mailing list