Sergey
Hello, everyone! I have drf swagger, and I do not understand how to annotate list and retrieve method in ReadOnlyModelViewSet, such that show in app/swagger. Anyone work with it?
Sanji
Hey Guys.... If an User uploads an IMAGE It's not showing after I uploaded it to Heroku..But the images are showing Locally
Sanji
What is the problem here?
Anonymous
Sanji
Anonymous
I have done it
That is why service is free
Anonymous
It deletes medias
Sanji
Is there any solution?
Anonymous
For static files You should use another service, and for deploy heroku, for example aws.
Sanji
I see..lemme try
Anonymous
It was showed this tutorial https://youtu.be/sSquD2u5Ie0
Anonymous
But i couldn't create an account on aws😕
Sanji
Sanji
It's not free
Anonymous
B
Я все
B
Бросил учится питона
B
Зб уже
Doragonsureiyā
Я все
Hi! This group is English-only. Please, translate your message into English and delete the non-english message. Or move to a group speaking your language (type "!ol" to see the list). Thank you.
B
Лучше заниматься другими работами
B
Mohamed
hi
Mohamed
I wanna to work on any site as freelancer developer , how can I make good profile I mean question is( any projects to put it on my profile?)
Luq
Hello I deployed django on windows server locally(for internal only) using apache for django and nginx for static files. Everything work perfect how can I configure static catching for nginx?
Pavel
Hello, how to get last value from arrayfield in lookup
William
Pavel
u can't do it in lookup
Pavel
I mean MyModel.objects.filter(my_array_field__last="")
Pavel
But last returns None
Pavel
No it's postgres ArrayField
Pavel
The whole picture is JsonField, where the array are stored by key "results". I write MyModel.objects.filter(my_json_field__results__<here i want to get last (like 0 => first)> =1)
Pavel
Wrote it with extra. Thanks
Yusuf
How to insert data in for foreign key attributes from django views?
For example i want input country by search country not select country, if country not found than add country..
Thanks sorry for my english.
Enam_may
Hi , what should I do to change my username_field in settings in order to create a login with email or phone number, I want to create a optional choices,
Please if any one know help me
♈
Django in is_active default field after form in show a true or false
But I want inactive active value show from 0 or 1
Please give a better solution
John
Hey guys I'm trying to search in class based views with pagination but I'm not able to search please help
John
https://pastebin.com/uaFywje6
https://pastebin.com/FKPwh7qT
Sunny
Hey, I am facing one issue with django migrate commad when attempting to create index from django model. The error is ValueError : Found wrong number (2) of constraints for model_name(field_name)
Sergio
Hi, what should I do to create a trial of my project?
Please if anyone know help me
thanks in advance
Umar
Sherlock
if request.method == 'POST':
user_form = UserForm(data = request.POST)
if user_form.is_valid() :
user = user_form.save()
user.set_password(user.password)
user.save()
i'm learning django, I have come across this code in making django form my doubt is why we are making new variable is user = user_form.save() why not just user_form.save() and all.... thanks in advance🙏🙏
ILYOSBEK
Anonymous
Joseph
Please I have a class called position category
Having a foreign key to department category.
In my html file
I have looped through
The departments
{% for cat in departmencat%}
To display all department
{% for position in cat %}
Display all positions in the department
{%endfor%}
{%endfor%}
But it is saying object is not iterable
Sarp
Hello gyus i am getting error while integrating razorpay in django project
Here i briefly described my problem
https://stackoverflow.com/q/68953901/12614466
Bruno
Joseph
Its being called from the database
William
William
vineeth
Any django recording course please?
Joseph
What specific info you needed?
Please want to loop through all department and in each departments it loops through all the positions in the department
William
Joseph
Ok
Joseph
https://pastebin.com/rihMYYzV
Joseph
William
From PositionCategory you need all the category?
William
Joseph
Yes please
Joseph
.
Please I have paated the codes there
William
Yes please
cat = PositionCategory.objects.filter(cat__name = request.user.category).select_related(''cat)
{% for i in cat.categorymain.all %}
{% endfor %}
Joseph
William
Joseph
Please I want it in a way that. After looping through all the departments. I want the other loop to loop through the department and get all the positions in the departments.
Because every department has different positions
William
♈
Django in is_active default field after form in show a true or false
But I want inactive active value show from 0 or 1
Please give a better solution
William
Jovial Joe Jayarson
I've a model 'Individual' with around 40 attributes. It returns the first one as string. But whenever an entry is made I get and error saying: 'Individual' object has no attribute 'q_01'. Snippet:
...
class Individual(models.Model):
fly = models.ForeignKey(
name="Family Name", to=Family, null=False, blank=False, on_delete=models.CASCADE, related_name="family_name")
# Question 1 - 10
q_01 = models.CharField(
name="01. Full Name", null=False, blank=False, max_length=100, default="")
q_02 = models.TextField(
name="02. Aliases / Nicknames", blank=True, max_length=200, default="")
# ... around 40 more attributes ... #
def __str__(self) -> self:
return self.q_01 # causes: 'Individual' object has no attribute 'q_01'
Is this a bug in latest django (3.2.6) or am I doing something wrong?
Anonymous
Anonymous
SUBHAN
Provide links.. To learn
I'm beginner
maverick
I've a model 'Individual' with around 40 attributes. It returns the first one as string. But whenever an entry is made I get and error saying: 'Individual' object has no attribute 'q_01'. Snippet:
...
class Individual(models.Model):
fly = models.ForeignKey(
name="Family Name", to=Family, null=False, blank=False, on_delete=models.CASCADE, related_name="family_name")
# Question 1 - 10
q_01 = models.CharField(
name="01. Full Name", null=False, blank=False, max_length=100, default="")
q_02 = models.TextField(
name="02. Aliases / Nicknames", blank=True, max_length=200, default="")
# ... around 40 more attributes ... #
def __str__(self) -> self:
return self.q_01 # causes: 'Individual' object has no attribute 'q_01'
Is this a bug in latest django (3.2.6) or am I doing something wrong?
Make sure that u not used the model name for another object
Roy Cyril
Hi , is it possible to alter the order of database fields without manually editing migration files? i have an abstract model with created_at and modified_at fields as a base model, which id use as parent for my other models, i want to make it thr last fields whenever i migrate it to the db, is this possible with the current dj version?if so how?thanks