google-code-export / django-treemenus

Automatically exported from code.google.com/p/django-treemenus
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Exception when trying to delete a (any) menuitem #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. http://localhost:8000/admin/treemenus/menu/1
2. Select any menuitem.
3. Delete + I'm Sure.

What is the expected output? What do you see instead?
Deleted Item.

Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in
get_response
  86.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in root
  157.                 return self.model_page(request, *url.split('/', 2))
File "/usr/lib/python2.5/site-packages/django/views/decorators/cache.py" in
_wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in
model_page
  176.         return admin_obj(request, rest_of_url)
File "/usr/lib/python2.5/site-packages/treemenus/admin.py" in __call__
  82.                 return self.delete_menu_item(request,
match.group('menu_pk'), match.group('menu_item_pk'))
File "/usr/lib/python2.5/site-packages/treemenus/admin.py" in delete_menu_item
  123.         return menu_item_admin.delete_view(request, menu_item_pk,
extra_context={ 'menu': menu })
File "/usr/lib/python2.5/site-packages/treemenus/admin.py" in delete_view
  29.             ignored_response = super(MenuItemAdmin,
self).delete_view(request, object_id, extra_context)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in
delete_view
  684.             obj.delete()
File "/usr/lib/python2.5/site-packages/treemenus/models.py" in delete
  70.             clean_ranks(old_parent.children())

Exception Type: NameError at /admin/treemenus/menu/1/items/27/delete/
Exception Value: global name 'clean_ranks' is not defined

What version of the product are you using? On what operating system?
Latest from trunk. Linux (OpenSuSE 10.3).

Please provide any additional information below.
None.

Original issue reported on code.google.com by st...@linadd.org on 29 Sep 2008 at 11:52

GoogleCodeExporter commented 9 years ago
Thanks for the report. This has now been fixed in trunk and in release 0.7.1.

Original comment by jpha...@gmail.com on 29 Sep 2008 at 1:29

GoogleCodeExporter commented 9 years ago
Absolutely brilliant, works like a charm, thank you!
/Lars

Original comment by st...@linadd.org on 29 Sep 2008 at 2:00