Opened 3 years ago

Closed 3 years ago

#20350 closed Bug (invalid)

Unable to edit and save data in database

Reported by: anonymous Owned by: nobody
Component: Python 2 Version: 1.3
Severity: Normal Keywords: django
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

class Report(models.Model):

user = models.ForeignKey(User, null=False)
incident_number = models.CharField('Incident Number', max_length=100)
device_id = models.CharField('Device Id', max_length=100)
app_uuid = models.CharField('Unique App Id', max_length=100)
created_date_time = models.DateTimeField('Created',auto_now=True)
manual_date = models.DateField('manual date', null=True, blank=True)
manual_time = models.TimeField('manual time',null=True, blank=True)

def when(request,pk=id):

if request.method == 'POST':

reportform = ReportForm(data=request.POST)

if reportform.is_valid():

report = Report.objects.get(pk=id)
report =
report.user = request.user
return redirect('/member/media/')


reportform = ReportForm(instance=report)

return render_to_response('incident/when.html',{

'newreport_menu': True,
'form': reportform,


(r'when/(?P<id>\w+)/$', 'when'),

I am not able to edit and update the data in database,How to solve this.


Change History (2)

comment:1 Changed 3 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Type changed from Uncategorized to Bug

comment:2 Changed 3 years ago by lukeplant

  • Resolution set to invalid
  • Status changed from new to closed

You haven't told us what the actual problem is, and this doesn't look like the place to get help: TicketClosingReasons/UseSupportChannels

Note: See TracTickets for help on using tickets.
Back to Top