Hi,
I have just started learning Django (been flip flopping between meteor and
django, cant decide which to use..) and I am fairly new to web development
in general.
Basically, I have a query where I am using the code "teecolor =
GolfCourseTees.objects.values('Tee_Color').filter(Course_Name=
Hi,
I have just started learning Django (been flip flopping between meteor and
django, cant decide which to use..) and I am fairly new to web development
in general.
Basically, I have a query where I am using the code "teecolor =
GolfCourseTees.objects.values('Tee_Color').filter(Course_Name=co
Thanks a lot for the reply! It got me thinking and I changed the code
around a bit and was able to get the result I was looking for. What I did
in the end was:
teecolor = GolfCourseTees.objects.filter(Course_Name='course').values()
tee1 = teecolor[0]
and in the HTML i used {{ tee1.hole1_distanc
Why not just do this? (Not sure if this is the most efficient way..)
models.py:
> class SignUpForm(forms.ModelForm):
> class Meta:
> model = Customer
>
class VmForm(forms.ModelForm):
class Meta:
model = Vms
class VmSpecForm(forms.ModelForm):
>
> Why not just do this? (Sorry for the crappy indentation.. tab doesn't work
> on here for some reason)
>
> models.py:
>
>
>> class SignUpForm(forms.ModelForm):
>> class Meta:
>> model = Customer
>>
>
> class VmForm(forms.ModelForm):
> class Meta:
>
Hi,
I am having some issues with making my form/model fields not required.
Currently this is the code that I have:
forms.py:
class startRound(forms.ModelForm):
player_2 = forms.CharField(widget=forms.TextInput(attrs={'disabled':'True',
'hidden':'True', 'id':'player_2'}))
player_3 = forms.CharF
Works like a charm, but I don't completely understand why that is
necessary. When I defined the text input as hidden and disabled, it
overwrote the initial settings of that field?
what exactly does this line do?
def __init__(self, *args, **kwargs):
forms.ModelForm.__init__(self
7 matches
Mail list logo