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'
Hadi
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.
R V Bandgar
Dima
Tioma
where?
Celery.py where settings
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 ?
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
Maxim
Anonymous
ali
Django is good for web chat?
قائد المنتخب
....
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
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
Ethiopia❨ከፍነው❩
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
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
Go for Fastapi
SK
how to pass the values to two if condition if return statement is executed for first if condition?
Anonymous
MD
Helle Django's people,How are you. I'm new in django...please suggest me how can i improve me....
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
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)
ShadowOfDead(Rorshok)
This is my question in chat gpt and it couldn't help me ...
ShadowOfDead(Rorshok)
It just gives me wrong answers
ShadowOfDead(Rorshok)
ShadowOfDead(Rorshok)
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)
Charly
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
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)
That the issue then, your database model is expecting just a single value not a list
Charly
remove the choices to make it work
Haleem
Haleem