Dennoh
Thank you for insights
Anders (izzno / gooood) 🇳🇴
How do you handle front end javascript dependancies with django? I've used CDN's / locale copies but want to move to a better (upgradable) solution. Placing the whole node_modules folder in static just does not seem right. There must be a better way ?
Mirco
Mirco
It's like Pipfile of pipenv
Mirco
Instead of using CDN and inject via script, use javascript imports and install via yarn
Anders (izzno / gooood) 🇳🇴
Do you have an example or an article ?
Mirco
Anders (izzno / gooood) 🇳🇴
I know of it, have not used it but it looks simuler to npm.
Raam Goulikar
Any Django examples of booking app or file data processing apps?
Mirco
Anders (izzno / gooood) 🇳🇴
It's sooo faster
Oh no i'm not worried about using yarn. It's the how you add the modules to static part i want to know ;)
Mirco
Anders (izzno / gooood) 🇳🇴
If you want say jquery, and you install thar with npm, you dont get one file like a cdn, you get tons of other dependacies as well.
Mirco
So then you can use dependabot on GitHub to keep up to date
Anders (izzno / gooood) 🇳🇴
Anders (izzno / gooood) 🇳🇴
where do you install your packages ?
Anders (izzno / gooood) 🇳🇴
Oh, you dont use django for frontend ?
Anders (izzno / gooood) 🇳🇴
Then you use webpack to gather ?
Mirco
Mirco
Anders (izzno / gooood) 🇳🇴
It depends on the project
https://pastebin.com/0fhEWDBK
You see, here's what i dont get. I just want the jquery file... How do i use this with django ?
Mirco
Anders (izzno / gooood) 🇳🇴
Yes, but where / how do you import the actual js file?
Anders (izzno / gooood) 🇳🇴
https://github.com/fiduswriter/django-npm-mjs/blob/master/README.md
This looks interesting
Mirco
Mirco
Mirco
It's a bit tricky when using Django templates , easier with modern web dev
Mirco
Because frontend and backend are totally independent
Anders (izzno / gooood) 🇳🇴
Yeah, but I like the template way of doing it... or at least for now.
Mirco
Anders (izzno / gooood) 🇳🇴
But yes... Drf and a pure fe framework would be fine as well. But I'm not there yet 😊.
Anders (izzno / gooood) 🇳🇴
The session handling in Django is too nice 🤫
Mirco
Rajat
rajat h:
Hi everyone i have a mini project to do on student database system i need some help where to begin with django also i want to implement things like auto updation of results of a student from other website and parent login to see statistics of student performance also graphical representation of performance and staff login also live attendance systemrajat h:
And it should send mails of results attendance shortage stuffrajat h:
Can i get links of online tutorials which can help me do this atleast some of it?
Ghorz
Anonymous
any one who is actively working on django projects
Anonymous
raven
https://github.com/RavenColEvol/django-react-boilerplate
Anonymous
Can any body tell me how to show online user at my website
....
Logged in users still see login page by url how to slove this issue
Sharique
Can any body tell me how to show online user at my website
You just need to save the last activity time in database. When displaying the user status, if last activity time is less than now+10 minutes then user is online else offline. Here i took currentTime+10 minutes, you can consider any number instead of 10 and it can be in seconds also
Sharique
cj
Ghorz
Ghorz
Hi guys, I managed to setup multitenancy. Database in Postgresql worked well with public and tenants schema.
Where I hit a wall was urlconf. I still can't figure out how to do the Apache mod_wsgi thing for tenants url.
I can serve django using Apache or nginx but find it difficult to configure multitenancy url.
Please hint me if you have worked with multitenancy. Thanks
Ghorz
For those who called my earlier post offtopic @mirco and Co. I was actually looking for a way to access Terminal features in my app. Have a look at this
https://ghorz.com/appmaker/
Needed to access python calls mixed with terminal command from my djangoproject.
Felipe
Hey guys! What's up?
Felipe
I'm working on a project with django rest framework. We'll have a module to sell products using stripe for payments. What's the best way to update the inventory quantity after receive a confirmation of payment?
Felipe
I'm thinking in create a signal. After the confirmation payment I'll create an invoice and dispatch a signal to update the inventory quantity. What do you guys think about? Is that a good approach or do you have any other idea?
Mirco
Anonymous
hi guys i looking for a public repo for Django 2 site i will be thank you if send me links
Sharique
Nurbek
Guys, how can I add my enpoints of my app into API root (DRF)? Is it possible? Is there a better way, I simply wanna place all my endpoints in one page..😳
Mihail
Hi! Say me, please, how can I get request in def clean_myfield(self) methods of ModelForm? I use this ModelForm in attribute 'from' of ModelAdmin.
Anonymous
Hey everyone, I'm wondering if anyone could help me out, I'm writing a chat app using Django channels I'm stuck with figuring out how to write a queue for sending messages to an offline user
Anonymous
Nurbek
Anonymous
Import the views and write it in the urls.py
Anonymous
Which aproach is best for live attendance update
Anonymous
I mean django or machine learning like yml
Ragul
Hi
Sharique
Ghorz
Build a product recommendation system
Ghorz
Build an app that extract data from csv, push it to database, display same data in template
Felipe
This blogpost can give you some ideas
Felipe
https://morioh.com/p/c6db04ec70ab/master-python-through-building-real-world-applications
Lugano
Rajat
Can anyone help me how to create QR code in python where i fill the details in a forum and while submitting using submit button, qr code will generated.
Anonymous
Hello, guys! I have such problem
I have 3 models - Region, Point, Route
Point have foreign key to Region
Route have foreign key to Region
Route also have many-to-many connection to Point
I want to do such thing:
If I choose region I want to see only points that in this region.
(chooses every such point: Point.region == Route.region)
And all the things are happening in Django-Admin
Description of models is here https://pastebin.com/qWEzfnup
Can anyone help with this problem?
Anonymous
I have example on photo
https://imgur.com/omHLltK
Muflone
https://simpleisbetterthancomplex.com/tutorial/2018/01/29/how-to-implement-dependent-or-chained-dropdown-list-with-django.html
Anonymous
Rajat