with No Comments

How to use data extracted from an application in Django form? I’m trying to make a form in Django using Django form. I need two types of forms. An application that gather data from user, do some computations and show the results to user without saving the info to database.

I want to show the result to user once he/she press button (calculate) next to it not in different page. A form that collect data from user, look for this in a column in google sheet, and if it’s unique, add it to the column otherwise inform the user a caution that the data is not unique.

Both of the should be done in the internet browser with JS so django or python doesn’t have to do anything with it. JQuery may also assist with this. I don’t know how to work with JS nor JQuey, A package has been written by me in python with many math equations to estimate something. What I want is a user, input a value in a form, immediately show the results beside it.

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

Start by writing it in a way that an individual submits the form (like any normal django form), you process it in your view, do the computation, and return the same page with the determined ideals (render the template). That way you understand everything is working needlessly to say. Then once that works, refactor to make your form submit the data using AJAX as well as your view to just return the calculation leads to JSON. Your AJAX success handler can place the results in the current page then.

You could use AJAX and javascript to do this, but I would recommend achieving this only via javascript. This implies you will have to rewrite the mathematics in result and JS it straight in the component. Thanks for your reply. It’s not a single equation. A bunch has been written by me of modules in python that i want showing their result in a website.

I used to experienced a wordpress website and after inquiry I came across python code can’t be integrated with php. So, I created a website using Django, I tried to create a form that collect data and render it in server aspect using my python code. If I want to rewrite all python codes in javascript, It takes lots of time although I guess I can use it in php website, too. I need to know isn’t there in any manner that can be dealt with using python and django?

Hey Majid. This may be done if you create an api to return the data. Consider JavaScript fetch or AJAX. This way you can do a request to your api and do the equations on the python side. 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 calculation, and return the same page with the calculated values (render the template).