Osama Been Lagging
Osama Been Lagging
Sorry it should be status=F('status_message')
Osama Been Lagging
Not success=F('status_message')
IM~Exynos
Not success=F('status_message')
How can I group this with user_id?
IM~Exynos
Group user_id with list of status_message
Osama Been Lagging
Ok now i get it what you are doing
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?
Doragonsureiyā
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?
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.
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??
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
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
why should use slug when i can use id
It makes the url look better
Mahmoud
Are there any one used django shopping cart ?
αмiʀ⁦⁦⁦⁦
only ?
And it's more user friendly
Mohamed
And it's more user friendly
ok i think it related to security because i think user shouldn't know his id in database
Mahmoud
Slug is very good for seo
Fife
only ?
🤷🏾‍♂️What can I say? it's better than using id IN MY OPINION
Fife
Using python-slugify
I don't know how to use this please
Денис
I don't know how to use this please
https://stackoverflow.com/questions/50436658/how-to-auto-generate-slug-from-my-album-model-in-django-2-0-4
Mohamed
then use UUID
instead of id or i create uuidField in addition to id
Mohamed
Dhani
Can anybody give example on dictionaries and list of dictionaries in django models. Thank you
Rakesh
I think you need to use celery in your case.
Thanks for the info, I willl start checking on this topic, if that didn't work, I will reach out to you again, please help
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??
Doragonsureiyā
Hello How can add more than one image for the product ?
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
Andrew
Guys Spring better or Django
If you ask, spring is better 😂😂
OceanMan
should i learn CBV first or rest framework ?
You should know the difference between fbv and cbv and chose the best for your use case
Say my Name
If you ask, spring is better 😂😂
I need to understand ai and ml through python
Say my Name
Where should i begin with
Say my Name
?
Andrew
I need to understand ai and ml through python
Then which one is python? Spring or Django
Say my Name
Say my Name
But i know spring and python both
Andrew
I suggest check freecodecamp on YouTube, slowly understand it
Say my Name
But ml ai is vast
Say my Name
Where to begin from
Maxim
Where to begin from
from the rules, stop offtopic
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
Say my Name
from the rules, stop offtopic
Consider those msgs as #offtopic channel of discord
Maxim
Consider those msgs as #offtopic channel of discord
we have a separate group, @pythonofftopic
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
just override the field in django-unixdatetimefield
Anonymous
just override the field in django-unixdatetimefield
I did this, but still when I update the model obj, created_at field is also updated
Ali
I did this, but still when I update the model obj, created_at field is also updated
it means u did not because Django calculates all the changes and it isn't possible that the problem is from Django's side I think it will be solved with this method
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?
Vladislove
use is_authenticated instead of that
if form.is_valid() and request.user.is_authenticated: this work. ty
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