Code

Opened 8 years ago

Closed 8 years ago

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

Download all attachments as: .zip

Change History (10)

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

  • Summary changed from [magic-removal] Adding a user fails in R2434 to [magic-removal] Editing a user fails in R2434

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

fix

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

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

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

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

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

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

new patch

comment:4 Changed 8 years ago by adrian

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

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

Changed 8 years ago by sfalcon@…

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

comment:5 Changed 8 years ago by anonymous

  • Component changed from Core framework to Tools
  • milestone set to Version 1.1
  • priority changed from normal to highest
  • Severity changed from major to critical
  • Type changed from defect to enhancement
  • Version changed from magic-removal to new-admin

comment:6 Changed 8 years ago by anonymous

  • Component changed from Tools to Metasystem
  • milestone changed from Version 1.1 to Version 0.93
  • priority changed from highest to low
  • Severity changed from critical to blocker
  • Type changed from enhancement to task
  • Version new-admin deleted

comment:7 Changed 7 years ago by adrian

  • milestone Version 0.93 deleted

Milestone Version 0.93 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.