Rσуαℓ geeк
isa
I can not find a thousand separator in django. There is a filter for thousand separator ? Like 123.456.789 ?
isa
with points
isa
or comma ? no matter
Astrapel
isa
Thanks astrapel
isa
👍
Beka
I already know, no need to reply me.
Manish
Hey 👋
Manish
I am looking for a job. Any recommendations or contacts are much appreciated. Thanks.
Manish
Also suggestions for interview are welcome
Manish
BTW I am using django since release of v2😁
Akash N
Can anyone give me clarity about the changes done on html file in Django
Deepak
can anyone provide me rest framework projects
Akash N
Deepak
?
Akash N
Changes in html file for connecting database
Deepak
use templates
Beka
Hey all, quick question. How can I get language code in HTML file? Is it possible?
Beka
SmQ
Beka
SmQ
What is the problem, JS object is not triggering correctly?
Beka
I wanted to get language code and just play with if/else statements.
Beka
Thanks for your advice.👍
Tony
If I have a model which contains an image field, what do i need to need to insert to the image field before i save it if i don't want to save it with a form.
SmQ
Just don't render the image upload/set option in the form
SmQ
In the model set blank=True, null=True
SmQ
In the image field
Tony
But I want to save the image in the database but I want to save it manually, I don't want to save it using a model form
Beka
What do you mean by "manually"?
Tony
Let me give you an example
Tony
I have a model
class Detail(models.Model):
name = models.CharField()
Saving it manually will be
d = Detail(name = "Tony")
d.save()
Tony
I want to use this same way to save an image field
Beka
What's is the purpose of this? If you are saving to database at the end.
Beka
Beka
Tony
Yh but how can I save a model with an image field in the django shell
SmQ
Another way would be get the fields using JSON post method and while sending the data in json field fix the image url
Beka
He wants to save an image field using shell.
Tony
Beka
Tony
SmQ
class user(models.Model):
name = models.CharField(max_length=20)
pic = models.ImageField()
SmQ
from django.core.files import File
user1=User(name='abc')
user1.pic.save('abc.png', File(open('/tmp/pic.png', 'rb')))
SmQ
got it from stackoverflow
Rajan
Hey help me to deploy django project on Apache 2
Rajan
Take a remote
Rajan
On my pc
Beka
No
I think, you need to import os module and save the image directory in variable and use that variable for image field.
Beka
Tony
Tony
Beka
I'm sure you can get image directory using package or os module.
Tony
Ok
Beka
Just make sure to get the only one image. Save somewhere in your folder one image and get that image in the shell and use that image.
Karthik
I am getting attributed error at/'tuple' object has no attribute 'get'
Beka
Tony
Tony
I got the same error when I did not render the view well
Karthik
When i am solving templateproject
Beka
Beka
Somewhere you are using tuple and get.
Isaías
Hello.
Isaías
How storage JWT token in django rest ?
Karthik
After cleaning attituderror
Karthik
I runserver but message is blank