how to get the filed mapName 's value on a form.. uding django
Posted
by zjm1126
on Stack Overflow
See other posts from Stack Overflow
or by zjm1126
Published on 2010-04-17T06:40:00Z
Indexed on
2010/04/17
6:43 UTC
Read the original article
Hit count: 168
my form is
class MapForm(forms.ModelForm):
class Meta:
model = Map
fields = ('mapName', 'kmlStr')
and the view is :
map_form = MapForm(request.POST or None)
if map_form.is_valid():
map = map_form.save(commit=False)
map.mapName=map_form.mapName#is thie code right ?
how to get the mapName 's value , us 'map_form.mapName' ?
thanks
© Stack Overflow or respective owner