ky
why we use limit_choices_to={} ??
ky
plz answer
Doragonsureiyā
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
ky
rtfm
what
ky
please explain
Charly
what
Read the documentation first
Rohan
plz answer
https://docs.djangoproject.com/en/4.0/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to
ky
i read but i can't understand
Rohan
Please read
ky
What part?
because i need show some specific column data
ky
in drop down list
ky
i used foreign key
ky
give some dependency
ky
then i use limit_choices_to={}
ky
but it is not working
Vxvek
Hai guys I'm facing issue with simple jwt token..that my access token is expiring very fast.. so I gave refresh_token 90 days.. but while passing refresh_token I'm getting token is invalid message..
Deepa
Hello friends, I have 3 models in my app in djanga. Based on the choice one particular model data will executed. For instance, if the choice is 1, all objects belong to that models will be listed. If the choice is 2, all objects belong to that model will be executed. How can I do that?
Deepa
Pls anyone help me with this. Thanks in advance
Sir
Should you do it in one sample?
Sir
?
Deepa
No, it shouldn't
Sir
Do you make 3 functions at views?
Sir
No, it shouldn't
Are you beginner in Django?
Deepa
S I am a beginner
Sir
So
Sir
Do you make 3 functions at views?
Sir
If not, make it
Charly
And the what would be way to filter it?
Shazeb
Did anyone use cookie cutter?
Djasur
Hey! Who worked with SOAP ???
Andrej
Has someone experience in using Django on top of Kubernetes? The architecture and the used patterns are different from the past. The containers in Kubernetes are mostly stateless and it seems a good approach to use the CQRS pattern, instead of an usual relational database. Is there a best practice for it?
Doragonsureiyā
Did anyone use cookie cutter?
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Shazeb
django cookie cutter
Shazeb
which is related with django
Maxim
django cookie cutter
ask specific question
Maxim
Hey! Who worked with SOAP ???
what does this have to do with Django?
😒😒
Hello guys Please I'm new to django, I'm trying to connect 2 tables together, so I've added the models.foreign key to the second, but the second table doesn't use the first table's pk as it's fk, it uses another field in the first table How can I make it that the second table uses the pk of the first table as it's foreign key?
Djasur
what does this have to do with Django?
Get data from soap server by api, and send data with drf to front
Maxim
Get data from soap server by api, and send data with drf to front
so this is a question about getting data via SOAP for a Django project that has nothing to do with Django (the project has something to do with Django, but no question)
Djasur
no
Okay, thanks
Doragonsureiyā
Hey! Who worked with SOAP ???
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Djasur
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Why not related to Django ? I need connect soap server and Django project. And get data and save to db… If u don’t know how to do this, say it.
😒😒
What exactly you are trying to do? Parent table fields nothing have to do with thw child table
MAIN_CATE | SUB_CATEGORY sub inherits from main, now I'm trying to send query for specific data in SUB while filtering using id/pk of MAIN
😒😒
MAIN_CATE | SUB_CATEGORY sub inherits from main, now I'm trying to send query for specific data in SUB while filtering using id/pk of MAIN
The field that SUB inherited from MAIN isn't unique, that's why I don't want to make use of it
Heron
I'm also new. What about using models.OneToOneField or models.ManyToManyField?
😒😒
''' class Main(models.Model): restro_name = models.ForeignKey(Restro) main_category = models.CharField(max_length=30, choices=choice) def save(self, *args, **kwargs): self.main_category = f'{self.main_category}-{self.restro_name}' super.save() ''' I'm overriding the save() method to append a name to whatever choice the user chooses onsubmitting the form but this doesn't work.
😒😒
Please any idea on how I can implement this?
Mirco
super(Main, self).save(*args,**kwargs)
Specifying the super class is not needed anymore super() is ok too
😒😒
super(Main, self).save(*args,**kwargs)
It worked after I deleted my dB and ran migrations
Heron
U can read in documentations
Got cha! Thanks anyway
Djasur
Got cha! Thanks anyway
Here we must solve problem if documentations and google does not helped
...
Ok. You just need self reference foreign key. Read django documents and use it.
https://stackoverflow.com/questions/15285626/django-self-referential-foreign-key
Heron
Here we must solve problem if documentations and google does not helped
Thank you but what I said was about a solution to the one who asked about two tables
Heron
I'm not sure if it could solve his problem. Sorry if I'm wrong.
Heron
HAHAHA it's okay. It was my fault that I didn't reply to his question instead just wrote it down
Yuriy
Hello. How can I translate phrases with tags inside: word <br>word?
Yuriy
No single-line
Djasur
I think Django doesn’t support translate with html tags
Djasur
U can try with translate block, may be
Yuriy
thanks