Mehrdad
Your code ...
Hadi
I made a CRUD app, but I don't see "User" selection option in my django admin panel. When I want to create a new post, I see all the fields in models.py file except "author" field. What should I do? https://dpaste.org/Thrwx
Hadi
I did this. the problem is "author" name doesn't show up and I when I use list_display in models.py I see <django.db.models.fields.related.ForeignKey> instead of actual "author" name.
Hadi
sending image isn't allowed in this group.
Hadi
I got this message: 'tuple' object has no attribute 'username'
MUHAMMED
I got an error field id expected a number but getting string. But i am passing number only
Rose
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://nekobin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Tioma
where?
Celery.py where settings
Anonymous
Does anyone have any idea about this? I am trying from last 6 days..Any help would be appreciated..
Where's the issue? U can't download according to start_date & end_date or unable to download csv file?
R V Bandgar
I don't know how to get start date and end date
R V Bandgar
I think I need to add start date and end date in change_list.html..is it correct ?
Anonymous
I think I need to add start date and end date in change_list.html..is it correct ?
Yeah from the client u have to get the date range and query the datas accordingly ,add to csv file and download
R V Bandgar
I need to know how to get the start date and end date in admin.py
Андрей
Hello Anyone knows how can i register model from another app in the other app admin
Андрей
For example, i have model User in user/models.py and im registering this model in game/admin.py, but it registers in user/admin.py anyway
Андрей
Is it even possible?
Андрей
Or i should move this model to game/models.py?
SK
unable to pass the values from one function to another function, can some one help me on this
ali
Django is good for web chat?
Eric
Django is good for web chat?
Not directly, but if you use Django Channels and websockets you can build a realtime chat
Anonymous
Django is good for web chat?
Go for nodejs,featherjs,fastapi
قائد المنتخب
....
Ethiopia❨ከፍነው❩
Am beginner of django how i become advanced short time help me.
Abhinand
Does anyone know how to add video call and realtime chat functionalities in django project, Help me
Brook
Am beginner of django how i become advanced short time help me.
What are some basic things you know about django? Do as many projects as you can with varying levels of difficulty.
Rose
....
Please don't send useless messages (Rule #3).
Naughty
Can anyone help me add to cart, view cart, remove items from cart, order multiple products and payment
ali
Go for nodejs,featherjs,fastapi
Do you mean I should change my stack?
pranav
How can we modify the templates in django all auth
pranav
Like when we direct to /account/signup , we already have a form but I want to put some styles and make a different form how can I achieve this
Mirco
How can we modify the templates in django all auth
If you read the documentation, you find the section where they explain how to customize templates
pranav
If you read the documentation, you find the section where they explain how to customize templates
I didn't actually understand it fully so I wanted if anyone could explain it in more simpler way or something
Alex
# attachments = serializers.JSONField() # linkedflashes = serializers.JSONField() # productimpacts = serializers.JSONField() class Meta: model = NewsFlash fields = "__all__"
Alex
am getting TypeError at /api/newsflash/ NewsFlash() got unexpected keyword arguments: 'many', 'context'wwhat would be causing this error this is my serializer
Alex
has anyone gotten this error
Alex
""" class NewsFlashSerializer(serializers.ModelSerializer): # attachments = serializers.JSONField() # linkedflashes = serializers.JSONField() # productimpacts = serializers.JSONField() class Meta: model = NewsFlash fields = "__all__" """
Alex
that's my serializer.py
Eric
I didn't actually understand it fully so I wanted if anyone could explain it in more simpler way or something
You extend the template that is part of allauth, extend the alluth form, and change things in your settings.py. So for example to customize the login page you would have a copy of the login.html that you find in allauth somewhere like templates/account/login.html`` your settings will need something like this `ACCOUNT_FORMS = {"login": "users.forms.CustomLoginForm"}``` and your `CustomLoginForm` extends `allauth.account.forms.LoginForm` It's pretty straight forward, you should really read just the docs.
Anonymous
Do you mean I should change my stack?
Yeah if performance is what you seek
ali
Yeah if performance is what you seek
I can't use microservices to solve this problem??
Anonymous
I can't use microservices to solve this problem??
Yeah i was talking about only the chats section not completely l
ali
Yeah i was talking about only the chats section not completely l
Yes, but if I start with js and change my stack, I should have solid knowledge of js, nodejs, expressjs, and ...
Anonymous
Go for Fastapi
SK
how to pass the values to two if condition if return statement is executed for first if condition?
SK
Nested if
can it be used in views?
MD
Helle Django's people,How are you. I'm new in django...please suggest me how can i improve me....
Rose
Helle Django's people,How are you. I'm new in django...please suggest me how can i improve me....
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial (https://docs.djangoproject.com/en/dev/intro/tutorial01/) * Tutorial from MDN (https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django) * Tutorial from django-girls (https://tutorial.djangogirls.org/en/)
Med
how to obtain token with username instead of email , django simple jwt im using TokenObtainPairView in my view class
Андрей
Why you delete my message??
Rose
Why you delete my message??
Read the rules before any activity: @Rules_for_Python
Rose
User Андрей has 1/3 warnings; be careful! Reason: rule #1: speak English
M
Guys how can i check my query execution time.i have an IT inventory management system.i am using sqlite.i was thinking of migrating to postgres,but before that need to make sure the slowness in loading data is not due to query execution
ShadowOfDead(Rorshok)
Hey guys, how do you do?. In my django app (Developed by django 4.2.7) I'm using CSRF_TRUSTED_ORIGINS in my settings.py and this list have to get items that they start with http:// or https:// then I want to pass any domain to it. I can't use CSRF_TRUSTED_ORIGINS = ["*"] cause it is restricted in Django 4.0 and above. Help me with that (I prefer using regex tell me how or if you have any other ways tell me)
UniCrypto🦄
Do you add corsheaders in the app?
ShadowOfDead(Rorshok)
This is my question in chat gpt and it couldn't help me ...
ShadowOfDead(Rorshok)
It just gives me wrong answers
cj
It just gives me wrong answers
that's why you don't use ChatGPT for those questions
ShadowOfDead(Rorshok)
ShadowOfDead(Rorshok)
https://pastebin.com/3pPh5ytr
Help me with that plz
ShadowOfDead(Rorshok)
Mehda
Hi quys there is some one whos make an application by django
Mehda
I need help
Mehda
I am just a bigginer and i want to help me
Rose
I am just a bigginer and i want to help me
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial (https://docs.djangoproject.com/en/dev/intro/tutorial01/) * Tutorial from MDN (https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django) * Tutorial from django-girls (https://tutorial.djangogirls.org/en/)
Haleem
I have a multiple checkbox selection field to select multiple days of the week in the form of admin panel. After user selected multiple days, i want to save it to db like a string with comma seperated value. when I selected mutiple values and hit save, i am getting errors as "Select a valid choice. ['tue', 'wed', 'thu'] is not one of the available choices." Below is my code of the form class BookmarksForm(forms.ModelForm): class Meta: model = Bookmarks fields = 'all' widgets = { 'weekly': forms.CheckboxSelectMultiple(choices=Bookmarks.DAY_CHOICES), } def clean_weekly(self): selected_days = self.cleaned_data.get('weekly', []) return ','.join(selected_days)
Haleem
Whats on your model?
DAY_CHOICES = [ ('mon', 'Monday'), ('tue', 'Tuesday'), ('wed', 'Wednesday'), ('thu', 'Thursday'), ('fri', 'Friday'), ('sat', 'Saturday'), ('sun', 'Sunday') ] weekly = models.CharField(max_length=27, blank=True, choices=DAY_CHOICES)
Charly
remove the choices to make it work
Haleem
remove the choices to make it work
i am doing now.. pls hold on