Re: How to push data fetched from excel to DB using Django?

2020-05-11 Thread DAVID ALEJANDRO Pineda
You can use the Fixtures feature First, pass to csv your spreadsheet Then, you have in mind the model or set of models ModelA ModelB The fields, the data type for every field. Then, convert to a file of JSON to load with the fixture command. I can share with you my code that do that: http

Re: Charts

2020-05-07 Thread DAVID ALEJANDRO Pineda
Hi friend There are some shortcuts like Highcharts, But i recommend to learn D3, is more difficult but it's worth. In general you hace to create a list on serializable dicts (on the view on python) and put the list like a json on the template (the tag to_json or something like that) Then, when th

Running sync_to_async to create object, but YET raise .ASynchronous exception

2020-05-06 Thread DAVID ALEJANDRO Pineda
Hello guys! I'm stucked on this problem, i have some script to save data to database using a django object. The script is with async,so i have to use the 'sync_to_async' function. Beyond that, running the script raise the ASynchronous exception, but it's look correct. Code: ``` async def