Re: Modeform Foreign key column not working

2021-10-26 Thread Aruna Priya Nagarajan
odules.objects.filter(user_id=request.user.id).filter(module_id=1).count(),"UserIsAuth":request.user.is_authenticated}) Anyone can help me on this?? Thanks, Aruna On Saturday, 23 October 2021 at 18:53:38 UTC+1 sutharl...@gmail.com wrote: > cool! mention not :) > > On Th

Re: Modeform Foreign key column not working

2021-10-21 Thread Aruna Priya Nagarajan
is `ConnectionTypes` a foreign key to `ConnectionDetails`? > in that case you don't need to put it as a field in form, it will be added > automatically in the form. > On Wednesday, 20 October 2021 at 18:47:44 UTC+5:30 Aruna Priya wrote: > >> Hi, >> >> I am trying to create

Modelform foreign key not working

2021-10-20 Thread Aruna Priya Nagarajan
Am new to django, and I am trying to create a form using modelform. The form has foerign key value (connection_type below in forms.py) and its not displaying the values it is referring to. For the image below, the columns, Connection name : displayed Connection type : text box has not appeared E

Modeform Foreign key column not working

2021-10-20 Thread Aruna Priya
Hi, I am trying to create a form from model and the model has a foreign key and am not able to populate the values from the column it refers to. My form, class ConnectionForm(forms.ModelForm): connection_type = forms.ModelChoiceField(queryset=ConnectionTypes.objects.all(), to_field_name='con