Sapna
Rohan
You need many=True for serialiser when you have more than one object in queryset
Sapna
Sapna
Sapna
Vaibhav
Still getting same
Your query set doesn't have height which is expected by the seralizer
Vaibhav
Try adding height to values.. It will change
Rohan
Rohan
Just send QS
Rohan
🤷♂️🤷♂️
Sapna
Sapna
Rohan
Also if you want only specified fields, you can’t expect it from same serialiser
Rohan
Make another and in fields, define only fields you want
Rohan
I see
Vaibhav
Rohan
Tried to give a hint from QS too but she didn’t get it
Rohan
Maybe you need to read drf docs Sapna
Sapna
Okay
Rohan
In fact not DRF, basic django
Rohan
Serializers
Rohan
Vaibhav
Meta does a lot of stuff, but hides everything
Y
Hello guys how are you?
Please i have some issues whith Django
Y
I had take project on github, so when I run following command python manage.py runserver, i obtain this error ModuleNotFound error
Y
Someone's can help me please?
Y
Personally I think that this error is due at python version
Mirco
Mirco
Sapna
Y
Mirco
Y
Pavan
Okay , Thanks
One more point , if you are using to_representation to overwrite the response json , you can write line 20 of your code , Employee.objects.all() , for to_representation usage please check https://www.django-rest-framework.org/api-guide/relations/
Riccardo
please help me
https://stackoverflow.com/questions/69809459/dropdown-dependent-problems-with-saving-in-the-form-part
Anton
Hello! I have an question. I have UpdateView. How i can get form object with data in post method?
λ701
Олег
hi, how to fix "'Media' object has no attribute 'render_q'"
appears when editing the model in the admin panel
ADI
Is it possible to one data filed to another data filed using Onetoone , foreignkeyfiled,ManytoMany filed
Any body guide to me
ADI
One data base to another database fileds
Carlos🇻🇪
hi guys, I've go a strange problem with migrate. Do the manage.py migrate create only the system tables (django, auth and so on) but ignore the migration of the app. Thhe app is listed in INSTALLED_APP, mangage.py makemigrations create the right 0001initial.py file that contain all the definitions, but migrate report a generic OK without create anything. The db is MySql (not a my choice) and django version in 3.2.9. Can anyone suggest any hint to sove this problem? Googling don't give me any valid suggestion
Shilpy
Geralt
Hello, i am following django docs tutorial
Geralt
it says add background image
using extension gif so name us background.gif
Geralt
why using gif as extension
Geralt
https://docs.djangoproject.com/en/3.2/intro/tutorial06/
Pavan
Pavan
Try with ,
python manage.py migrate <your app name>
fn
Hi all! If anybody has any ideas, pls help!)
https://stackoverflow.com/questions/69804457/how-to-get-a-value-of-foreign-key-between-apps-of-django
anuprash
How to add clipboard features on django project
Y
Hello ,I have some error when I run python manage.py run server
So I try to install requirements ,it's impossible
Y
I want to have some solutions please
Y
Error is ModuleNotFoundError:No module named'Meteoapp'
Y
Meteoapp is my application name's
Y
Ok thanks you
Jagadish
Anonymous
DJANGO/ COMMAND TO FIND ALL CONTENT WRITTEN BY PARTICULAR USER
Anonymous
Mirco
i did, but didn't find.
Imagine you have a model Content with FK to User model called user
Content.objects.filter(user=user)
Where user can be request.user in your views
ms tk
How can i use SQLAlchemy in django, can anyone help me
Danil
Hey guys, I have a model that extends basic user class and I want to create a form that would have a field from that user class (email).
I have tried the following, but i get an error AttributeError: 'ForwardOneToOneDescriptor' object has no attribute 'email'
class CreateManagerForm(forms.ModelForm):
email = forms.CharField()
class Meta:
model = Manager
fields = ['firstName', 'lastName', 'companyName']
def __init__(self, *args, **kwargs):
super(CreateManagerForm, self).__init__(*args, **kwargs)
user = kwargs.get('instance')
email = user.user.email
self.fields['email'].initial = email
Could you check it pls?
Doragonsureiyā
Sai
Any alternative websocket integration rather than channels. My requirement is just to notify the client if model change.
Frontend: Angular
Note: I know channels are preferred, but my project is LIVE.
BinKhalid
Hello, I have an English website built with Django, is there any way to make it in another language? Like translate it or something
Doragonsureiyā