How To Use Data EXTRACTED FROM AN APPLICATION In Django Form?

How to use data extracted from an application in Django form? I’m trying to create a form in Django using Django form. I want two types of forms. A form that collects data from the consumer, do some computations and show the results to the user without conserving the info to the database.

I want to show the effect to consumer once he/she press button (calculate) next to it not in a different page. An application that collects data from the user, look for it in a column in Google sheet, and if it’s unique, add it to the column normally inform the user a warning that the info is not unique.

Both of the should be achieved in the internet browser with JS so django or python does not have to do anything with it. JQuery may also assist with this. I have no idea how to work with JS nor JQuey, I’ve written a package in python with many math equations to calculate something. What I want is a user, input a value in an application, immediately show the results beside it.

  • Windows 7 DVD install disk or ISO image
  • Installation will start. It is done Once, you can simply close the home window
  • Create a contact signature with your site’s address
  • Increase sales pipeline from online sales by 20% by end of year
  • Delivery, help us get even better by embracing our team-working culture

Start by writing it in a way that the user submits the proper execution (like any normal django form), you process it in your view, do the computation, and come back the same page with the determined values (render the template). That real way you know everything is working needlessly to say. Once that works Then, refactor to make your form submit the info using AJAX as well as your view to just return the calculation results in JSON. Your AJAX success handler can put in the results in the current page then.

You could use AJAX and JavaScript to achieve this, but I would recommend carrying this out only via JavaScript. This implies you will need to rewrite the math in JS and output it straight in the component. Thanks for your reply. It isn’t a single formula. I’ve written a bunch of modules in python that I want to show their output in a website.

I used to have a wordpress website and after inquiry I came across python code can not be integrated with the. So, A website was made by me using Django, I tried to make a form that collects data and render it in the server part using my python code. If I want to rewrite all python rules in JavaScript, It takes lots of your time although I guess I can use it in the website, too. I need to know isn’t there in any manner that this can be managed using python and django?

Hey, Majid. This could be done if you create an API to return the data. Consider JavaScript AJAX or fetch. This way you are able to do a request to your app and do the equations on the python side. Start by writing it in a way that an individual submits the proper execution (like any normal django form), you process it in your view, do the calculation, and return the same page with the calculated values (render the template).

  • |