Osama Been Lagging
Osama Been Lagging
Sorry it should be status=F('status_message')
Osama Been Lagging
Not success=F('status_message')
IM~Exynos
IM~Exynos
Group user_id with list of status_message
Osama Been Lagging
Ok now i get it what you are doing
IM~Exynos
Collo
My virtual machines crash on startup in my Ubuntu host. I'm using virtual box 6.138 and Ubuntu 22.04
Who can help with this?
Fife
class QuestionSerializer(serializers.ModelSerializer):
author = serializers.StringRelatedField()
slug = serializers.SlugField(read_only=True)
class Meta:
model = Question
fields = 'all'
Please what am I doing wrong??
Mirco
Fife
On the browsable api, when I try to add another question, it says slug field required. When I test it with python shell, the slug is created dynamically
Mirco
Fife
class Question(models.Model):
published = models.DateTimeField(auto_now_add=True)
title = models.CharField(max_length=250)
body = models.TextField()
slug = models.SlugField(max_length=250, unique_for_date='published')
author = models.ForeignKey(User, on_delete=models.CASCADE, related_name='questions')
def str(self):
return self.title
Денис
In your model slug is required
Денис
Mb use blank =True null=True , and set slug in clean or save in your model
Денис
Using python-slugify
Mohamed
why should use slug when i can use id
Fife
Mahmoud
Are there any one used django shopping cart ?
Mohamed
αмiʀ
only ?
And it's more user friendly
Mahmoud
Slug is very good for seo
Fife
only ?
🤷🏾♂️What can I say? it's better than using id IN MY OPINION
cj
Mohamed
then use UUID
instead of id or i create uuidField in addition to id
cj
Mohamed
Dhani
Can anybody give example on dictionaries and list of dictionaries in django models. Thank you
Chikal
{{ value1|intcomma }}
{{ value2|intcomma|lang"de" }}
{{ value3|intcomma }}
but value2 got an error ?
how to do it ?
Chikal
solved : using {% load i18n %}{% language 'de' %}{{ value2|intcomma }} {% endlanguage %}
i forget it wkwkwk
Rajat
Please anyone can help me to deploy django celery project on aws 🙏
Mihail
How can I inherit methods from class to use them in models as mixins? Also would like to see this method as attribute of model, and not as my python parent class.
Ankit
Hii everyone...
As in React if we define a view fir url "/*" then it will be showen for all urls
But in django how to do this.
𝙰𝚜𝚑𝚠𝚒𝚗
Say my Name
Guys Spring better or Django
Hamza
Hello
How can add more than one image for the product ?
Sofia
Hi, what is the best way to the relationship between two models from two different app so that in the future not occur problems??
Andrew
OceanMan
Say my Name
Where should i begin with
Say my Name
?
Andrew
Say my Name
k
Say my Name
But i know spring and python both
Andrew
I suggest check freecodecamp on YouTube, slowly understand it
Say my Name
Say my Name
But ml ai is vast
Say my Name
Where to begin from
Andrew
Oh! A good one you check Andrei Negolai, he have some paid course and a machine learning track
Andrew
Can do it step by step from the beginner level up
Maxim
Anonymous
Hello everyone
I want to save Unix timestamp instead of DateTimeField,
how can I do this when I want save my model?
I try django-unixdatetimefield package but when I update model obj, created_at field time updates too
Ali
Ali
just override the field in django-unixdatetimefield
Anonymous
Mohamed
Mohamed
thanks
My
👋 Cen i run pyrogram script with djnago
Vishal
ERRORS:
master.commonproject: (fields.E336) The model is used as an intermediate model by 'master.DMUMaster.commonwith', but it does not have a foreign key to 'DMUMaster' or 'project'.
Vishal
can anyone help me for this issue ??
Vladislove
if form.is_valid() and request.user != AnonymousUser:
guys why this work when user anon?
Ali
Anthony
Hello
Some of my DB records deleted suddenly and I checked all request logs and DB history
I think my django project has a problem but I checked all foreignkey and all .delete() statements in my project and all were correct.
Can anyone guess why my records deleted?
IM~Exynos
(end_date < start_date + interval '10min' )
How to write this query filter via django model.
Like to fetch data from db only when the end_date and start_date diffrence is more than 10min.
Tanay
hey anyone i seriously want a django big project for collage can anyone provide me abig project