hi can anybody gimme any help about how to overwrite a model entry. i have latitude, longitude, and status fields in my model. once i save the data i cant update or change it from my custom template. how to update or overwrite these fields. this is my views.py
def status_change(request):
if request.method == "POST":
rform = registerForm(data = request.POST)
if rform.is_valid():
register = rform.save(commit=False)
register.user = request.user
register.save()
return render_to_response('home.html')
else:
rform = registerForm()
return render_to_response('status_change.html',{'rform':rform})
and this is my Forms.py
class registerForm(forms.ModelForm):
class Meta:
model=register
fields = ('latitude', 'longitude', 'status')