Swapnil
What happen bro ?
Pedro
you can override save method and customize it
Sb
I want send mail in django it shows in sendmail function
here we will use SMTP for this problem
Andrew
google "django admin cookbook", there was chapter called similar to your question
Pedro
as i said. Overwrite save method.
Anonymous
like button .? django ? any libraries or?
Anonymous
How can I store image into a database (E.g SQLite) using SQLalchemy?
Anonymous
Store path to image
the user can upload it from the webpage
sqwerty
And?
Anonymous
And?
I don't know what to write in the data setup file to store an image
Anonymous
what the column datatype should be
sqwerty
what the column datatype should be
String. You'll store the path to the document on the computer
Anonymous
String. You'll store the path to the document on the computer
I know that but I want to make it bytes and store it directly into the database
Anonymous
Why?
Hahaha I just wanted like that 🙆🏻+ Is it badly effect on something?
Ansab
How to devolep a voip mobile application?
sqwerty
Hahaha I just wanted like that 🙆🏻+ Is it badly effect on something?
https://habiletechnologies.com/blog/better-saving-files-database-file-system/ You are welcome
Aditya
Please help me where should I start learning Django
Doragonsureiyā
Check out PythonRes, a channel for Python resources (links to help you out).
Doragonsureiyā
Please help me where should I start learning Django
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Pedro
What the logs say?
🤔
What the logs say?
"Ring-ding-ding-ding-dingeringeding! Gering-ding-ding-ding-dingeringeding! Gering-ding-ding-ding-dingeringeding!"
🤔
sorry
Alex
sorry
!ot you'll enjoy it
Doragonsureiyā
sorry
Looks like you need an offtopic group, please continue this conversation at @PythonOfftopic
Bral Bral
Hi! How i can get values from related model using foreign key? For example: model1: ... field1 model2: ... ForeignKey(model1) How get field1 from model1 in model?
Bral Bral
I am using viewsets and modelserializer
Pedro
That's not the logs output. Check /var/logs
Luis
Hi ! Can someone help understand Django managers ?
Luis
Help me**
Pedro
Chandan I don't answer in private.
Pedro
Do you know google?
Luis
How can I use Django managers for creating foreign key relations? If someone can give a hint, ty
Luis
sure, say you have this code, i'll send an image
Luis
https://dpaste.org/aiAx
Luis
how would you the code of create_author_with_posts ?
Luis
would you just use lazy loading to bring the related model (Post) or try another way ?
Luis
by lazy loading I mean with this from django.apps import apps
Luis
thanks in advance for anyone who can help
Mirco
You can just create a new Post by passing an author Much easier
Luis
yes, you're right, but for making that Post object you should import it in managers.py
Luis
and in that moment there's a circular dependency error
Luis
would you use lazy loading to avoid that
Mirco
Yup, but do you really need a custom manager for this simple operation ?
Luis
or another way ?
Luis
it's just as an example
Luis
im trying to restructure my whole app, it's pretty big
Luis
so trying to get an elegant way to do it
Mirco
A custom manager that gets all published posts of an author makes more sense for example
Mirco
Elegant doesn't mean to write code that is too much for a simple operation
Mirco
Simple is better than complex
Shivam
Can anyone help me install django
Shivam
I've been trying but nothing seems to work.!!
Shivam
Installing it by cmd
Shivam
But it gives me an error every time I use. "django-admin startspace new" command
Cesar
Uhm startspace is not valid....
Cesar
Did you read the documentation?
Pedro
Startapp
Matthew
It should be startproject first
Shivam
Sorry
Shivam
Startproject
Katia
Hello . Does someone have a good booking or scheduling application tutorial ?
Cesar
Startproject
Dude... Some people are trying to help others (including you) but if no error is sent what can we do? Be more explicit . "When I use django-admin startproject name it says xxxxx or yyyyy" that's a better way for getting help.
Shivam
Well I'm trying to reinstall it right now
Shivam
So if anything goes wrong i'll be back.!!
Luis
Where do you guys put your business logic ?
xarala221
Where do you guys put your business logic ?
The easiest place and the recommended one is to put it in views.py But if you have lot of code I suggest to create separate folder and files
Cesar
Where do you guys put your business logic ?
I used to do it on views but the changed to mldels
Luis
How about using managers ?