Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#1416 closed task (fixed)

[patch] [magic-removal] admin.views.main fixes

Reported by: Nebojsa Djordjevic <nesh at studioquattro dot co dot yu> Owned by: Adrian Holovaty
Component: Metasystem Version:
Severity: blocker Keywords:
Cc: nesh@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When I try to change user I got a following traceback in m-r [2434]:

TypeError at /admin/auth/user/1/
add() got an unexpected keyword argument 'message'
Request Method: 	POST
Request URL: 	        http://localhost:8000/admin/auth/user/1/
Exception Type: 	TypeError
Exception Value: 	add() got an unexpected keyword argument 'message'
Exception Location: 	/store/django_no_magic/django/contrib/admin/views/main.py in change_stage, line 347

/store/django_no_magic/django/contrib/admin/views/main.py in change_stage

 341. elif request.POST.has_key("_saveasnew"):
 342. request.user.message_set.add(message=_('The %(name)s "%(obj)s" was added successfully. You may edit it again below.') % {'name': opts.verbose_name, 'obj': new_object})
 343. return HttpResponseRedirect("../%s/" % pk_value)
 344. elif request.POST.has_key("_addanother"):
 345. request.user.message_set.add(message=msg + ' ' + (_("You may add another %s below.") % opts.verbose_name))
 346. return HttpResponseRedirect("../add/")
 347. else:

 348. request.user.message_set.add(message=msg) ...

 349. return HttpResponseRedirect("../")
 350. else:
 351. # Populate new_data with a "flattened" version of the current data.
 352. new_data = manipulator.flatten_data()
 353.
 354. # TODO: do this in flatten_data...

Attachments (3)

admin.diff (3.9 KB) - added by Nebojsa Djordjevic <nesh at studioquattro dot co dot yu> 11 years ago.
fix
admin.2.diff (5.4 KB) - added by Nebojsa Djordjevic <nesh at studioquattro dot co dot yu> 11 years ago.
new patch
mr-tutorial-fixes.diff (6.1 KB) - added by sfalcon@… 10 years ago.
Patch for doc/tutorial0X.txt files for the magic-removed branch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by Nebojsa Djordjevic <nesh at studioquattro dot co dot yu>

Summary: [magic-removal] Adding a user fails in R2434[magic-removal] Editing a user fails in R2434

Changed 11 years ago by Nebojsa Djordjevic <nesh at studioquattro dot co dot yu>

Attachment: admin.diff added

fix

comment:2 Changed 11 years ago by Nebojsa Djordjevic <nesh at studioquattro dot co dot yu>

Summary: [magic-removal] Editing a user fails in R2434[patch] [magic-removal] admin.views.main use add instead of create to add messages

comment:3 Changed 11 years ago by Nebojsa Djordjevic <nesh at studioquattro dot co dot yu>

Summary: [patch] [magic-removal] admin.views.main use add instead of create to add messages[patch] [magic-removal] admin.views.main fixes

User use add instead of create
history use Context instead of template.RequestContext

Changed 11 years ago by Nebojsa Djordjevic <nesh at studioquattro dot co dot yu>

Attachment: admin.2.diff added

new patch

comment:4 Changed 11 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2440]) magic-removal: Fixed #1416 -- Fixed admin to use .create() rather than .add() for related objects. Thanks, nesh

Changed 10 years ago by sfalcon@…

Attachment: mr-tutorial-fixes.diff added

Patch for doc/tutorial0X.txt files for the magic-removed branch

comment:5 Changed 10 years ago by anonymous

Component: Core frameworkTools
milestone: Version 1.1
priority: normalhighest
Severity: majorcritical
Type: defectenhancement
Version: magic-removalnew-admin

comment:6 Changed 10 years ago by anonymous

Component: ToolsMetasystem
milestone: Version 1.1Version 0.93
priority: highestlow
Severity: criticalblocker
Type: enhancementtask
Version: new-admin

comment:7 Changed 10 years ago by Adrian Holovaty

milestone: Version 0.93

Milestone Version 0.93 deleted

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