Adding csv as models

13 views
Skip to first unread message

Preethy P Johny

unread,
Sep 23, 2022, 9:50:34 AM9/23/22
to Django users
Hello All,

I am new to Django and currently in the mid of a project. I am creating a dashboard for a hospital and the data is in the form of a csv/xls. I have rendered the the interactive graphs which I need to display on the dashboard, however on the jupyter notebook. How can I integrate it in Django?

Please help and suggest and advice.

Thank You

Thomas Lockhart

unread,
Sep 23, 2022, 12:42:22 PM9/23/22
to django...@googlegroups.com
This is a very broad question so perhaps you are the stage of choosing the tools.

The workflow, handling historical data, managing updates and replacement data, etc are things to consider for a production system so you’ll need to deal with those design questions.

For my most recent system I do a file upload, then have separate code which reads the file into models. Separating these things helps with managing “sets” of data and catching malformed files.

For fancy plots I use Bokeh which, if you don’t need realtime updates, can be run from within Django.

For models, you should consider factoring your data to reduce duplication, but if it is really just a plotting problem then slam all of the data in the csv into a single model and start rendering.

hth

- Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e8a97535-b41c-470d-a1cc-f945c123e823n%40googlegroups.com.

Sajanraj T D

unread,
Sep 23, 2022, 1:30:24 PM9/23/22
to django...@googlegroups.com
You can use js datatable to render csv or what ever you want in the table format. You can also upload data as csv in file upload in model form. If you want to render csv, then it should transform to json format and pass via jsonresponse. Or httepresponse using mimetype. 

--

M Adnan

unread,
Sep 23, 2022, 1:47:06 PM9/23/22
to django...@googlegroups.com
My name is Muhammad Adnan, I have one year experience in Django and Django rest framework with html,css and Bootstrap and JavaScript. I need Part job if anyone have part time job than they can contact me on Whatsapp 03094051037.
Thanks 😊

Reply all
Reply to author
Forward
0 new messages