6
9 Comments

Need help with Django web app & ready to help you with your project!

Hi all! I'm developing my first public side project. I met some difficulties with Django framework, and now I'm seeking for help.

The task in a nutshell: get two numerical values from the user, manipulate them and give the result in the form of a png plot. I did the whole part related to plotting (pandas+matplotlib), but I can’t figure out how to integrate it to the webapp.

How can I help you in return:

  • I'm product manager in fintech & digital banking industry (Europe) and can give a lot of insights about it
  • can test your products and give detailed feedback
  • can help with UI/UX, prototyping, customer researches
  • can help with metrics and analytics systems such as GA
  • well versed in mobile applications, in any questions
  • can help with search for developers and designers

This is my first post here, I wonder what the effect will be. Thanks!

on August 19, 2019
  1. 1

    In your view, call the code that generates the image, and return a Response with the binary data return HttpResponse(binary_image_data, content_type="image/png")

    You will want to decide if the user data should come from the GET query_params or in POST data. But it depend on how you want to use the image. If perhaps you want to embed it in an html <img> tag, you could use query parameters and caching.

  2. 1

    You have a few options:

    The last option is what I am doing for bar charts in https://yetanothersermon.host and it's working pretty well so far.

    1. 1

      Thx for the links!

      My problem is that I don't understand how to take 2 values from POST-form and, after that, plot the chart on the next page in Django.

      1. 1

        Feel free to fire me an email: dean@yetanothersermon.host

        Happy to help

  3. 1

    For the best UX you will want to create an AJAX function that takes in them two numerical values.

    Then run your script inside that function and then either store the image on the hard drive or send it as the response.

    Hope that helped, should give you some things to google.

    If you need more help feel free to email, can always hop on a call and help you out.

    1. 1

      thx! btw, what is the best solution to host this project (webpage+script)? Heroku will be good for it?

      1. 1

        Most likely the easiest options.

        I know IH is hosted with https://render.com/

        The script will be inside of Django. It won't live by itself anymore. You can make it a package I guess and import it. Otherwise just copy the requirements.txt and the python file into Django project.

    2. 1

      This comment was deleted 7 years ago

  4. 1

    Hey man, more than happy to help. Experience Django dev

    Shoot me an email: hello@dannyaziz.com