.
Why do you pass the pk? Can't you pass the object itself?
Object contains unserializable things like connection to the database
Someone
.
Thanks for your help here
I shoot on my feet once before on this problem😂
Someone
I shoot on my feet once before on this problem😂
😂 next time I will be able to help someone with similar problem
Zaxk
Can we use django along with sql
Anonymous
hey everyone, i have a problem with session. When i reload session cleans. Is it ok? and how i can save data to avoid data lost?
Orack
can we do dynamic folder creation
Orack
like localhost/upload for bob user should upload files in ./bob/ location, and for user2 in ./user2
Mirco
like localhost/upload for bob user should upload files in ./bob/ location, and for user2 in ./user2
you need to pass a function to upload_to attribute of your FileField
Mirco
in that function you can use instance that is the request.user
Orack
u mean
Orack
cover = models.ImageField(upload_to=request.user)
Orack
?
Mirco
https://simpleisbetterthancomplex.com/tutorial/2016/08/01/how-to-upload-files-with-django.html
Orack
upload = models.FileField(upload_to=user_directory_path)
Mirco
Maksim
upload_to=request.user.username
Mirco
better
Only if u have unique usernames
RafaelRS
How to make on administration page all line being link, not only text in column?
Sumit
Has anyone here used self- hosted sentry ??
Maksim
Only if u have unique usernames
I think most people use unique usenames
Orack
Mirco
It depends on requirements and anyway it's not a good practice to have media folder named with usernames
Mirco
But you are obviously free to do as you want to
Mirco
then how do people do it usually
Using some uuid + username or just uuid Something like that
Orack
Ha
Hello everyone I need to write a simple rest api program that contains a messaging system using django Whats the most suitable way to do it? Thank you.
Doragonsureiyā
Has anyone here used self- hosted sentry ??
Please don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello I need help on $z" Just ask about your problem directly! With 40k+ people the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
Sumit
Has anyone here used self- hosted sentry ??
I installed the sentry onpremise version using docker in my system, but I'm confused what to do next If anyone here worked with self hosted version of sentry, please guide me
Orack
module
Luis Duque
Hello guys, I don't know if I'm misunderstanding the concept of geodjando but geodjando can edit and create geometries? or is geodjando just for visualization like geoserver for example, thanks beforehand
S
Hello! Who can help with password reset via mail in django rest wramework?
There is one liberary name Django any mail you can check it out
S
Hello everyone I need to write a simple rest api program that contains a messaging system using django Whats the most suitable way to do it? Thank you.
Django rest API with twilio or any thired party api,,, you need to write one script for authorization (it's available online) and call that api
Anders (izzno / gooood) 🇳🇴
I kept recieving welcome mails from an old api i created a year or two ago all day... And i could not understand why... I kept working until i realized I copied and cleaned that api to start a new one I am working on 😂, every create user post 😂 🍺 have a nice weekend.
highnes
Is there a way that i can add members to a telegram chanel from django
Georgiy
Hello. Guys, could you tell me please what problem do I encounter: 1. install pip packages in local repo 2. push and deploy it to remote 3. remote server tells me that i need to install packages on that machine is it a common practice to install packages twice (local & remote), or I miss smthn?
cj
let me suggest you to look up for pip-tools, simple but good tool to manage packages
Mirco
let me suggest you to look up for pip-tools, simple but good tool to manage packages
Or pipenv , now it's also into the official pypa repo 😍
Alek
Could you help me with Query in django? https://stackoverflow.com/questions/57915341/implement-search-by-two-forms-django/57917155#57917155
Александр
Hi! Could u help me? How to create a "recently viewed" function on my site?
Jorge Luis
How can i make a variable global to all templates
Jorge Luis
Put in my navbar a permanent count of Objects, but i dont want to add in every view a entry to do that
Jorge Luis
Like the User variable i want to make mine global in the templates
Luis
Or Function Based Views?
Luis
fbv
Hhmm... did you try to create a function to inject extra data to context and return the rendered template?
Luis
If currently you're using *render* function, you can easily do a replace in all your views
Luis
fbv
You can use a decorator to add context to your views https://stackoverflow.com/questions/17176759/django-add-context-to-response-using-decorator
Anonymous
Can we a attach a routing map through Django ?
Jorge Luis
If currently you're using *render* function, you can easily do a replace in all your views
Thanks, i have solved my problem using custom template tags. Thanks anyway, i'll use your way in other ways. Also you can use Context Processors for that too
Anonymous
Any best tutorial for understanding django rest APIs..?
🏳️‍🌈Robby [ Private Message = Spam]
Mehul
Any best any easy tutorial for django beginner
Samuel
Any best any easy tutorial for django beginner
Did you just copy pasted the same question as before?
Orack
Any best tutorial for understanding django rest APIs..?
this took me a week but easy once you get it 😂
Orack
Idk i just googled something, the problem is there are many different ways to create one and everyone uses some other way
Anonymous
Hey, Can we attach a routing map through Django ?
🏳️‍🌈Robby [ Private Message = Spam]
Mehul
Did you just copy pasted the same question as before?
I want begnning level course for django
Doragonsureiyā
Doragonsureiyā
I want begnning level course for django
Check out PythonRes, a channel for Python resources (links to help you out).
🏳️‍🌈Robby [ Private Message = Spam]
Mehul there ya go