tfhx8
Sorry?
Why not use transactions in method save() ?
tfhx8
In model, instead signal
tfhx8
Can you send example job code transactions where used money?
tfhx8
interesting to see your method
Cesar
tfhx8
tfhx8
Here not method transation
Cesar
guess it could be checking self.id maybe 🧐
tfhx8
Here can collision
Cesar
tfhx8
Where is with transaction.atomic ?
tfhx8
It no
Cesar
please share your solution to this "problem"
Batman
Cesar
But whats the problem with using signals?
tfhx8
Yash
I am working on excel file uploaded from user form, modifying it using openpyxl lib.
After making changes, I want to convert file to pdf and export the file back to user. How can I achieve this?
Eric
Yash
Cesar
Rish
My html page show code on chrome browser
Rish
Give me solution
Mirco
DCT
Pls give me tutorial for django
Cesar
Bunty chhatri wala..
Tutorial on CDuD practice using FBV's without using django forms. Anyone?
Bunty chhatri wala..
CRUD*
Viktor🔮
Viktor🔮
I guess you have studied Python with google, is it hard to find a tutorial for Django?
Selman
maroong
I am really confused about images. How do I display an image with img src without storing it or creating a static folder
Mirco
AJ
Mirco
AJ
However I have never used a CDN or sperate storage myself 🤔
AJ
I use free cloudlfare cdn
Anonymous
how to open static pdf files in templates
Martín
hello, this may be a very newbie question
I have a cookiecutter-django project
I want to get the base URL in Python code, so that if the url is
http://myweb.domain.com:8000/admin/anything
I want to get
http://myweb.domain.com:8000
preferably without a trailing slash ('/') at the end as shown
I googled and found a get_current_site in django.contribs, but I think it goes to the database
Is there any way to retrieve this base URL for saving it in a variable in my settings? Is get_current_site and the database the only way to go to do this (other than hardcoding or environment variables)?
Mirco
Martín
aham
Martín
I'm going to make my first django/heroku deployment
Mirco
Doesn't care the platform
Martín
so I don't know which is going to be the domain yet
Mirco
Yup u know
Martín
so I think an environment variable should be the way
Mirco
Martín
ok, I'm trying and asking if any trouble shows up
Martín
thanks
Mirco
!yw
Doragonsureiyā
You're welcome! 😊
Martín
hi again
is there some way to get the current scheme being used? so that I know if the web is http or https?
Mirco
Martín
but I want to write code which works locally and in production
Mirco
For doing what ? Maybe there's an easy way instead of checking protocol
Martín
well, I'm using the base URL of the web to access an chrooted SFTP
so if I add /some/directories/ to the URL, after some checks it accesses /some/directories in the SFTP
Martín
until now I had in the base.py a SERVER_URL variable
Martín
hardcoded
Martín
but I'm changing precisely that
Martín
I could hardcode https in production.py and http in local.py
Mirco
If you run manage.py check --deploy you will see the list of them
Batman
Mirco
Martín
Mirco
Batman
Mirco
Just read Django docs about going on prod
Martín
Mirco
Python code
I strongly recommend to read Django docs accurately about deploying stage
Mirco
You will.find lots of answers
Martín
ok, I'm googling