Ghorz
Built 21st century software please
Ghorz
The earlier you start using it the better
Brandon
Oh ok, I'm installing it
.
smoozy progammer
Ghorz
Your django maybe dockerised
Katia
Built 21st century software please
Thanks for your help. The use case is more complicated than what I briefly described and the use of one login page doesn't suit my need.
Gustavo
install wsl
At sometimes, database fails on WSL.
.
At sometimes, database fails on WSL.
use docker, but yep - use linux
Ghorz
Oh ok, I'm installing it
Your django maybe hosted on aws, digital ocean or others, no matter the orchestration method. You'll mostly find Linux. Except its a small django app you can host it on shared hosting.
Gustavo
I use Herokup to deploy my Django site.
Ghorz
I use Herokup to deploy my Django site.
OK. It's been a while. I host on shared hosting if the app requires little resources. Switch crontab for celery
Ghorz
But for huge app I don't use django because of time constraints
Ghorz
For Entreprise Level app, Django is not very productive
Ghorz
But it's awesome
Gustavo
But for huge app I don't use django because of time constraints
Now I understood why my tables page slowed down because of CSV and to_html().
Gustavo
But for huge app I don't use django because of time constraints
Here I can not ask an off-topic question about a huge app with alternative to Django, but written in Python.
Ghorz
Now I understood why my tables page slowed down because of CSV and to_html().
Nit really, it depends on 1. Your hosting resources 2. Your algorithm 3. The file size being processed
Ghorz
Now I understood why my tables page slowed down because of CSV and to_html().
If the file exceeds 100kb, process in background job
Ghorz
Frappe Framework
Frappeframework.com
Gustavo
If the file exceeds 100kb, process in background job
My page loads after 45 seconds because of 18 tables rendered with pandas's CSV and to_html().
Ghorz
Don't load it manually using traditional page load
Ghorz
Instead, allow the page to load with no data. The use Ajax to fetch and load the data to a datatable also paginated the data
Gustavo
If I don't use jQuery?
Ghorz
You can use vanilla js or react, vue, angular or python
Ghorz
Python in the browser
Ghorz
Like Transcrypt that transpile python to js 6
Ghorz
If I don't use jQuery?
You can use Jquery or any other library
Gustavo
I prefer not using jQuery.
Charly
I prefer not using jQuery.
then use the thing you want, ajax is standard in browsers
Ghorz
I prefer not using jQuery.
Foe every django app you build ensures Javascript is used on the client
Ghorz
I prefer not using jQuery.
I was there before, swore never to use JS. Instead converted python code to js But on my first real job. I had no choice but to use JS. 😁 You love to hate it and hate to love it
Gustavo
Too bad, it will be very painful because I don't know very well JavaScript. I'll sabotage my site for learning JavaScript, and Angular, Reactjs and Vuejs.
Ghorz
What you should do it ensure your Django Project is API based by default
Ghorz
You can use django rest framework Or better still if scared of DRF, write vanilla api using default view the return json response
Gustavo
Yes, my https://raw.githubusercontent.com/gusbemacbe/gusbemacbe.co.nz/main/financial_planning/views.py is too much thing. I'll sabotage it. But a guy told me to use threading to speed up the tables page.
Ghorz
There's a better way. I don't see why you should load entire data at once. If you js and socketio it will be better off
Gustavo
Anyone
I have been searching for "web share", but I will give a screenshot.
Gustavo
Ah, the screenshots are not allowed here.
Gustavo
Use link
https://gusbemacbe.herokuapp.com/financial-planning/
Gustavo
Did it take long time to load it on your computer, Ghorz Ace?
Ghorz
https://gusbemacbe.herokuapp.com/financial-planning/
You could build a dynamic database that can collect all this imformation
Ghorz
Then query it on page load
Gustavo
in Python or JavaScript?
Ghorz
Rather than loading it all the time
Ghorz
in Python or JavaScript?
Your django model
Ghorz
There is something called child table
Gustavo
I never tried to develop model for CSV, converting to currencies and rendering the table in HTML.
Ghorz
I may not be able to explain it but Google dynamic model
Ghorz
It will aid easy manipulation and update
Gustavo
And converting to currencies, using Forex and ExchangeRates API (JSON)?
Ghorz
It's better off
Ghorz
It makes it easy if in the future you intend to connect a mobile app to it
Ghorz
Api helps
Gustavo
I feel I am too nobble to that part of dynamic model. It is too new for me.
Gustavo
I have to study. It will be very painful.
Ghorz
I have to study. It will be very painful.
It's not a one off thing, with time, your experience will guide you
Gustavo
And about django-tables2? Does it use a dynamic model to create tables?
Ghorz
Dynamic model is abstract in nature
Gustavo
Did you see django_table2?
Gustavo
The guy said me that if CSV is always the same, I should load it in the module outside the function.