My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Last 30 days

  • Dec 14, 2009
    issue 25 ([patch] some tests fails) commented on by ivan.fed...@gmail.com   -   I don't have the time to check it. This bug reproduceable only in few big configurations, so it's hard to find it. AFAIR my patch is "copy-paste" from django.auth tests, so I'm think it's work right. :)
    I don't have the time to check it. This bug reproduceable only in few big configurations, so it's hard to find it. AFAIR my patch is "copy-paste" from django.auth tests, so I'm think it's work right. :)
  • Dec 14, 2009
    issue 28 (Extending Menu Items breaks some unit tests) Status changed by jphalip   -   Ok, I'm reopening. I'll take a look at it when I find the time. Thanks.
    Status: New
    Ok, I'm reopening. I'll take a look at it when I find the time. Thanks.
    Status: New
  • Dec 13, 2009
    issue 28 (Extending Menu Items breaks some unit tests) commented on by richardbarran   -   Hi again, Tried r58 but it has not fixed the problem. Sorry :-(
    Hi again, Tried r58 but it has not fixed the problem. Sorry :-(
  • Dec 13, 2009
    issue 25 ([patch] some tests fails) commented on by richardbarran   -   I've noticed that test_move_item_or_clean_ranks also fails for me when using PostgreSQL (but works when I'm using SQLite).
    I've noticed that test_move_item_or_clean_ranks also fails for me when using PostgreSQL (but works when I'm using SQLite).
  • Dec 12, 2009
    issue 28 (Extending Menu Items breaks some unit tests) Status changed by jphalip   -   I think it should be fixed in r58. Try again with the latest development version and see if that fixes your problem. Thanks!
    Status: Fixed
    I think it should be fixed in r58. Try again with the latest development version and see if that fixes your problem. Thanks!
    Status: Fixed
  • Dec 12, 2009
    r58 (Resolved conflict in tests) committed by jphalip   -   Resolved conflict in tests
    Resolved conflict in tests
  • Dec 09, 2009
    issue 28 (Extending Menu Items breaks some unit tests) commented on by richardbarran   -   Hi again, I've dug deeper into this bug to find the exact condition that reproduces it. Attached to this post is a diff that creates a new app called 'temp'; this is basically a copy-and-paste of the example code from MANUAL.txt. It creates a new model AND the admin to go with it. If you plug this example app into a project (and add it to INSTALLED_APPS) you should be able to reproduce the bug... hopefully! I've found that the source of the bug is the line "inlines = [MenuItemExtensionInline,]", although I don't know *why* it's a problem :-(
    Hi again, I've dug deeper into this bug to find the exact condition that reproduces it. Attached to this post is a diff that creates a new app called 'temp'; this is basically a copy-and-paste of the example code from MANUAL.txt. It creates a new model AND the admin to go with it. If you plug this example app into a project (and add it to INSTALLED_APPS) you should be able to reproduce the bug... hopefully! I've found that the source of the bug is the line "inlines = [MenuItemExtensionInline,]", although I don't know *why* it's a problem :-(
  • Dec 09, 2009
    issue 35 (r55 breaks tests if treemenus has been extended.) Status changed by jphalip   -   Thanks for the report. I think this should be fixed in r57. Please re-open this ticket if the problem still exists.
    Status: Fixed
    Thanks for the report. I think this should be fixed in r57. Please re-open this ticket if the problem still exists.
    Status: Fixed
  • Dec 09, 2009
    r57 (Hopefully fixes some tests with menu extension models) committed by jphalip   -   Hopefully fixes some tests with menu extension models
    Hopefully fixes some tests with menu extension models
  • Dec 08, 2009
    issue 35 (r55 breaks tests if treemenus has been extended.) reported by richardbarran   -   1. Use checkout of r55. 2. Extend model MenuItem as per included instructions - in particular, use 'related_name="extension"' exactly as per line 318 of MANUAL.txt Unit tests will then fail with multiple errors - there is a clash as the treemenus unit tests are trying to add an app 'menu_extension' that extends MenuItem and uses the SAME related_name as the one suggested in the manual. An easy fix to this is to change the related_name used in the test app to another value.
    1. Use checkout of r55. 2. Extend model MenuItem as per included instructions - in particular, use 'related_name="extension"' exactly as per line 318 of MANUAL.txt Unit tests will then fail with multiple errors - there is a clash as the treemenus unit tests are trying to add an app 'menu_extension' that extends MenuItem and uses the SAME related_name as the one suggested in the manual. An easy fix to this is to change the related_name used in the test app to another value.
  • Dec 07, 2009
    issue 34 (Allow non-existent menus in templates) commented on by woodman.dana   -   Sounds good, I respect your opinion. Love the tool, it's great work! Cheers
    Sounds good, I respect your opinion. Love the tool, it's great work! Cheers
  • Dec 07, 2009
    issue 33 (Too many empty lines in the produced html) commented on by kmo...@hotmail.com   -   Thank you very much for the hint.
    Thank you very much for the hint.

Older

  • Dec 06, 2009
    issue 32 (register django-treemenus on pypi) Status changed by jphalip   -   The empty package has been removed from pypi. It should all be fine now.
    Status: Fixed
    The empty package has been removed from pypi. It should all be fine now.
    Status: Fixed
  • Dec 05, 2009
    issue 30 (Feature Request:; Breadcrumbs / trail) commented on by jphalip   -   Hi again. I've slightly changed my mind about this. A good implementation has been suggested in issue #29. Follow that issue if you're interested in adding this new feature.
    Hi again. I've slightly changed my mind about this. A good implementation has been suggested in issue #29. Follow that issue if you're interested in adding this new feature.
  • Dec 05, 2009
    issue 29 ([enh] Server-side foldable menu) Status changed by jphalip   -   Hi Daniele. Thank your for this report and sorry for attending it so late - I've just been very busy lately. I think these features (is_selected flag and breadcrumbs) would be a really useful contribution to treemenus. Could you please submit a patch with some tests to prove that it all works? Thanks a lot.
    Status: Accepted
    Hi Daniele. Thank your for this report and sorry for attending it so late - I've just been very busy lately. I think these features (is_selected flag and breadcrumbs) would be a really useful contribution to treemenus. Could you please submit a patch with some tests to prove that it all works? Thanks a lot.
    Status: Accepted
  • Dec 05, 2009
    issue 30 (Feature Request:; Breadcrumbs / trail) Status changed by jphalip   -   Hi guys. Thanks for the suggestions and the discussion. I agree this should be done externally and not within this app. One way to do it would be to create a custom template tag that checks the current path and matches it against your menu items. Good luck with it! ;)
    Status: WontFix
    Hi guys. Thanks for the suggestions and the discussion. I agree this should be done externally and not within this app. One way to do it would be to create a custom template tag that checks the current path and matches it against your menu items. Good luck with it! ;)
    Status: WontFix
  • Dec 05, 2009
    issue 32 (register django-treemenus on pypi) Status changed by jphalip   -   Not sure who created that empty entry. I made a request to get it removed. I created a new proper package for it (http://pypi.python.org/pypi/django-treemenus/0.8), but it seems to be in conflict with that other empty one.
    Status: Accepted
    Not sure who created that empty entry. I made a request to get it removed. I created a new proper package for it (http://pypi.python.org/pypi/django-treemenus/0.8), but it seems to be in conflict with that other empty one.
    Status: Accepted
  • Dec 05, 2009
    issue 26 (can't override extrahead block of menuitem/change_form.html) Status changed by jphalip   -   Accepting this ticket, but I'm not sure if that can actually be fixed at this stage due to some limitations in Django. You are welcome to submit patches.
    Status: Accepted
    Accepting this ticket, but I'm not sure if that can actually be fixed at this stage due to some limitations in Django. You are welcome to submit patches.
    Status: Accepted
  • Dec 05, 2009
    issue 34 (Allow non-existent menus in templates) Status changed by jphalip   -   Thank you for the report. I understand your use case, however at this stage I prefer to let it raise an exception if the menu does not exist. You can always write your own custom template tag to allow this behaviour. If you, or someone else, has a compelling reason for letting it fail silently, then please re-open this ticket and I'll re-consider it. An alternative could also be to add an extra argument to the template tag: def show_menu(context, menu_name, menu_type=None, fail_silently=False): try: context['menu'] = menu if menu_type: context['menu_type'] = menu_type return context except Menu.DoesNotExist: if fail_silently: return context else: raise
    Status: Invalid
    Thank you for the report. I understand your use case, however at this stage I prefer to let it raise an exception if the menu does not exist. You can always write your own custom template tag to allow this behaviour. If you, or someone else, has a compelling reason for letting it fail silently, then please re-open this ticket and I'll re-consider it. An alternative could also be to add an extra argument to the template tag: def show_menu(context, menu_name, menu_type=None, fail_silently=False): try: context['menu'] = menu if menu_type: context['menu_type'] = menu_type return context except Menu.DoesNotExist: if fail_silently: return context else: raise
    Status: Invalid
  • Dec 05, 2009
    r56 (Fixed small typo in doc) committed by jphalip   -   Fixed small typo in doc
    Fixed small typo in doc
  • Dec 05, 2009
    issue 28 (Extending Menu Items breaks some unit tests) Status changed by jphalip   -   Thanks for the report Richard, but I cannot reproduce this bug. In r55 I have restructured the tests to try to reproduce the conditions you described, but all the tests still pass. I'm closing as invalid. But if you still have problems with that, please re-open this ticket with a precise description of how to reproduce this bug. Thank you.
    Status: Invalid
    Thanks for the report Richard, but I cannot reproduce this bug. In r55 I have restructured the tests to try to reproduce the conditions you described, but all the tests still pass. I'm closing as invalid. But if you still have problems with that, please re-open this ticket with a precise description of how to reproduce this bug. Thank you.
    Status: Invalid
  • Dec 05, 2009
    r55 (Restructured tests) committed by jphalip   -   Restructured tests
    Restructured tests
  • Dec 05, 2009
    issue 25 ([patch] some tests fails) commented on by jphalip   -   I cannot reproduce this bug. I tried with: LANGUAGES = (('ru', 'Russian'),) LANGUAGE_CODE = 'ru' USE_I18N = True ... but all tests still pass. Could you please provide me with the conditions that reproduce this problem?
    I cannot reproduce this bug. I tried with: LANGUAGES = (('ru', 'Russian'),) LANGUAGE_CODE = 'ru' USE_I18N = True ... but all tests still pass. Could you please provide me with the conditions that reproduce this problem?
  • Dec 05, 2009
    issue 31 (Russian translation update) Status changed by jphalip   -   Thanks Alex. Fixed in r54.
    Status: Fixed
    Thanks Alex. Fixed in r54.
    Status: Fixed
  • Dec 05, 2009
    r54 (Updated Russian locale. Thank you Alexander Yakovlev. Fixes ...) committed by jphalip   -   Updated Russian locale. Thank you Alexander Yakovlev. Fixes #31.
    Updated Russian locale. Thank you Alexander Yakovlev. Fixes #31.
  • Dec 05, 2009
    issue 33 (Too many empty lines in the produced html) Status changed by jphalip   -   Thanks for the report, but as suggested by woodman.dana, you can easily override the templates if you want to get rid of those white spaces.
    Status: WontFix
    Thanks for the report, but as suggested by woodman.dana, you can easily override the templates if you want to get rid of those white spaces.
    Status: WontFix
  • Dec 02, 2009
    issue 30 (Feature Request:; Breadcrumbs / trail) commented on by woodman.dana   -   Very nice, Ill have to take a look at your project. Glad you went the route of a new app rather than hacking on a current one, usually the best path. Cheers!
    Very nice, Ill have to take a look at your project. Glad you went the route of a new app rather than hacking on a current one, usually the best path. Cheers!
  • Dec 01, 2009
    issue 30 (Feature Request:; Breadcrumbs / trail) commented on by ringemup   -   Yeah, not really meaning breadcrumbs specifically, but highlighting each node along the path from root to current branch on a fully-displayed tree -- not necessarily in the template, but at least using some flag in the tree data so a custom template can retrieve that info. Couldn't figure out how to do this with treemenus, so I ended up rolling my own menu solution using django-mptt.
    Yeah, not really meaning breadcrumbs specifically, but highlighting each node along the path from root to current branch on a fully-displayed tree -- not necessarily in the template, but at least using some flag in the tree data so a custom template can retrieve that info. Couldn't figure out how to do this with treemenus, so I ended up rolling my own menu solution using django-mptt.
  • Dec 01, 2009
    issue 30 (Feature Request:; Breadcrumbs / trail) commented on by noemi.millman   -   Yeah, not really meaning breadcrumbs specifically, but highlighting each node along the path from root to current branch on a fully-displayed tree -- not necessarily in the template, but at least using some flag in the tree data so a custom template can retrieve that info. Couldn't figure out how to do this with treemenus, so I ended up rolling my own menu solution using django-mptt.
    Yeah, not really meaning breadcrumbs specifically, but highlighting each node along the path from root to current branch on a fully-displayed tree -- not necessarily in the template, but at least using some flag in the tree data so a custom template can retrieve that info. Couldn't figure out how to do this with treemenus, so I ended up rolling my own menu solution using django-mptt.
  • Dec 01, 2009
    issue 30 (Feature Request:; Breadcrumbs / trail) commented on by woodman.dana   -   These should be separate cases first off, second, Im not sure a "breadcrumb" feature would apply to treemenus. A separate Django app for breadcrumbs would be more logical (not sure if one already exists...). I agree it would be nice to have the template know if the current page was being rendered and apply some sort of active class on the item but I believe you could accomplish this writing you own middleware that checks the page, then outputting it to your own set of templates (that override photologues). Cheers
    These should be separate cases first off, second, Im not sure a "breadcrumb" feature would apply to treemenus. A separate Django app for breadcrumbs would be more logical (not sure if one already exists...). I agree it would be nice to have the template know if the current page was being rendered and apply some sort of active class on the item but I believe you could accomplish this writing you own middleware that checks the page, then outputting it to your own set of templates (that override photologues). Cheers
  • Dec 01, 2009
    issue 33 (Too many empty lines in the produced html) commented on by woodman.dana   -   You could always override the templates in your app and set it up how you like (e.g. use the `spaceless` templatetag).
    You could always override the templates in your app and set it up how you like (e.g. use the `spaceless` templatetag).
  • Dec 01, 2009
    issue 34 (Allow non-existent menus in templates) reported by woodman.dana   -   If you have installed treemenus, created a template that renders a menu but that menu is not in the system, the templates throw a "Menu matching query does not exist" error, which in some use cases (e.g. in mine), this is not desirable and instead if the exception was ignored it would be a preferred result. I have included a diff to make the show_menu templatetag catch the exception and pass off the context if the menu doesn't exist. The main advantage of this is you could include menus in a template that doesn't exist yet, but allowing for them to be added in once they are created in the admin.
    If you have installed treemenus, created a template that renders a menu but that menu is not in the system, the templates throw a "Menu matching query does not exist" error, which in some use cases (e.g. in mine), this is not desirable and instead if the exception was ignored it would be a preferred result. I have included a diff to make the show_menu templatetag catch the exception and pass off the context if the menu doesn't exist. The main advantage of this is you could include menus in a template that doesn't exist yet, but allowing for them to be added in once they are created in the admin.
  • Nov 25, 2009
    issue 33 (Too many empty lines in the produced html) reported by kmo...@hotmail.com   -   Viewing the source html file, I see too many spaces and empty lines in the produced pages, which were not introduced in the templates (menu.html, menu_item.html): <div class="suckertreemenu"> <ul id="treemenu1"> <li><a style="border-left: 1px solid black; min-height:14px"></a></li> <li><a href="/admin/">Áñ÷éêÞ</a></li> <li><a href="">ÄïìÞ</a> <ul> <li><a href="/admin/edulll/axonaprot/">¢îïíåò</a></li> <li><a href="/admin/edulll/themprot/">ÈåìáôéêÝò</a></li> .... Django 1.1.1 Treemenus v.0.8
    Viewing the source html file, I see too many spaces and empty lines in the produced pages, which were not introduced in the templates (menu.html, menu_item.html): <div class="suckertreemenu"> <ul id="treemenu1"> <li><a style="border-left: 1px solid black; min-height:14px"></a></li> <li><a href="/admin/">Áñ÷éêÞ</a></li> <li><a href="">ÄïìÞ</a> <ul> <li><a href="/admin/edulll/axonaprot/">¢îïíåò</a></li> <li><a href="/admin/edulll/themprot/">ÈåìáôéêÝò</a></li> .... Django 1.1.1 Treemenus v.0.8
  • Nov 23, 2009
    issue 32 (register django-treemenus on pypi) reported by mhansen   -   django-treemenus should be registered on the Python Package Index (PyPI) so that it could be installed via easy_install / zc.buildout / pip / etc. Currently, the entry is rather emtpy: http://pypi.python.org/pypi/treemenus
    django-treemenus should be registered on the Python Package Index (PyPI) so that it could be installed via easy_install / zc.buildout / pip / etc. Currently, the entry is rather emtpy: http://pypi.python.org/pypi/treemenus
  • Oct 14, 2009
    issue 31 (Russian translation update) reported by alex.s.yakovlev   -   For django-treemenus r53.
    For django-treemenus r53.
  • Oct 07, 2009
    issue 29 ([enh] Server-side foldable menu) commented on by jphalip   -   Thank you so much for your thoughts and code. I'm quite flat out at the moment and will review it in more detail when I find the time. Regards, Julien
    Thank you so much for your thoughts and code. I'm quite flat out at the moment and will review it in more detail when I find the time. Regards, Julien
  • Oct 06, 2009
    issue 30 (Feature Request:; Breadcrumbs / trail) reported by ringemup   -   It would be super useful to have a way to determine whether each item in the tree is part of the active branch, and output that to the template. On a similar but different note, breadcrumbs would be a nice feature to have.
    It would be super useful to have a way to determine whether each item in the tree is part of the active branch, and output that to the template. On a similar but different note, breadcrumbs would be a nice feature to have.
  • Oct 04, 2009
    issue 29 ([enh] Server-side foldable menu) commented on by daniele.varrazzo   -   I've fumbled with the urls above: [1] contains the tags implementation, [2] is the show_menu_item template.
    I've fumbled with the urls above: [1] contains the tags implementation, [2] is the show_menu_item template.
  • Oct 04, 2009
    issue 29 ([enh] Server-side foldable menu) reported by daniele.varrazzo   -   Hello, I don't see a ML/group for this project, so I leave here my proposal. Tell me if there is a better place to discuss it anyway. I used your project for the new Italian Python website, and I've chosen your project instead of rolling my own menu structure (as I did in other projects) for the very well done and usable admin interface. The website preview is available at http://www2.python.it/ The look is the same of the python.org website, and is side menu is "foldable": from the homepage only the first level items are visible; when you click on any item you move to a different page where only its second level children are visible; when you click on a second level item the new page will show all the 1st level items, only the 2nd level siblings of the clicked one and its children etc... It's easier show it than type it: for an example go to http://www2.python.it/comunita/sito/ (sorry if the link breaks: we are organizing the pages now; feel free to roam). I was able to crete this menu using your project: I didn't have to subclass the objects (and it's natural: it is just a different visualization) but I had to write a customized 'show_menu_item' template tag where I added to the context a 'menu_item_selected' flag; the template can then decide whether to visit or not the item children depending on its value. You can see in [1] the tags [1] http://hg.python.it/pythonit/file/tip/pythonit/siteapp/templatetags/menuapp.py [2] http://hg.python.it/pythonit/file/tip/pythonit/siteapp/templates/menu_item.html The decision of whether an item is selected or not is based on the request path: the rule used is that the item whose url is the longest prefix of the request path is selected, and all its ancestors are selected too. This way not only the pages for which an "exact" menu item exist work well, but also sub-pages of the same areas (e.g. a menu can bring the user to a Django application entry page, let's say /board/ Every internal board page will display the menu expanded at least to the "board" item). Having a function returning "which menu item is selected" also makes possible to use a menu to generate matching breadcrumb trails: you can see them in the website; they are generated using a {% show_breadcrumb "menu name" %} tag, also implemented in [2]. The bulk of the implementation is in [3]: what I do is to create a regex from the items urls in order to quickly match the "longest prefix handled by a menu item". I use post_save and post_delete signals to invalidate the regexp and regenerate it at the following request. [3] http://hg.python.it/pythonit/file/tip/pythonit/siteapp/menuapp.py The trail of items and the is_selected predicate are computed finding the item with longer path prefix and traveling through the parents: generating the breadcrumbs would require n database hits and evaluating is_selected for an item would also be linear in the tree depth (thus a complete tree rendering would roughly require a quadratic number of database hits). For these reasons I cache the menu items, using id -> item and url -> item maps (invalidated by signals too). Notice that these problems can be avoided storing "modified preorder tree traversal" informations in the database [4], using which you can select a path form root to a certain node in a single database query). [4] http://www.sitepoint.com/print/hierarchical-data-database/ As you could see I was able to build these features on top of treemenus only replacing the tags and I'm happy with that, but if you are interested I can integrate directly such code into the treemenus app and provide you the relevant patches. I think the breadcrumb trail matching the menu structure is a nice feature. Regards.
    Hello, I don't see a ML/group for this project, so I leave here my proposal. Tell me if there is a better place to discuss it anyway. I used your project for the new Italian Python website, and I've chosen your project instead of rolling my own menu structure (as I did in other projects) for the very well done and usable admin interface. The website preview is available at http://www2.python.it/ The look is the same of the python.org website, and is side menu is "foldable": from the homepage only the first level items are visible; when you click on any item you move to a different page where only its second level children are visible; when you click on a second level item the new page will show all the 1st level items, only the 2nd level siblings of the clicked one and its children etc... It's easier show it than type it: for an example go to http://www2.python.it/comunita/sito/ (sorry if the link breaks: we are organizing the pages now; feel free to roam). I was able to crete this menu using your project: I didn't have to subclass the objects (and it's natural: it is just a different visualization) but I had to write a customized 'show_menu_item' template tag where I added to the context a 'menu_item_selected' flag; the template can then decide whether to visit or not the item children depending on its value. You can see in [1] the tags [1] http://hg.python.it/pythonit/file/tip/pythonit/siteapp/templatetags/menuapp.py [2] http://hg.python.it/pythonit/file/tip/pythonit/siteapp/templates/menu_item.html The decision of whether an item is selected or not is based on the request path: the rule used is that the item whose url is the longest prefix of the request path is selected, and all its ancestors are selected too. This way not only the pages for which an "exact" menu item exist work well, but also sub-pages of the same areas (e.g. a menu can bring the user to a Django application entry page, let's say /board/ Every internal board page will display the menu expanded at least to the "board" item). Having a function returning "which menu item is selected" also makes possible to use a menu to generate matching breadcrumb trails: you can see them in the website; they are generated using a {% show_breadcrumb "menu name" %} tag, also implemented in [2]. The bulk of the implementation is in [3]: what I do is to create a regex from the items urls in order to quickly match the "longest prefix handled by a menu item". I use post_save and post_delete signals to invalidate the regexp and regenerate it at the following request. [3] http://hg.python.it/pythonit/file/tip/pythonit/siteapp/menuapp.py The trail of items and the is_selected predicate are computed finding the item with longer path prefix and traveling through the parents: generating the breadcrumbs would require n database hits and evaluating is_selected for an item would also be linear in the tree depth (thus a complete tree rendering would roughly require a quadratic number of database hits). For these reasons I cache the menu items, using id -> item and url -> item maps (invalidated by signals too). Notice that these problems can be avoided storing "modified preorder tree traversal" informations in the database [4], using which you can select a path form root to a certain node in a single database query). [4] http://www.sitepoint.com/print/hierarchical-data-database/ As you could see I was able to build these features on top of treemenus only replacing the tags and I'm happy with that, but if you are interested I can integrate directly such code into the treemenus app and provide you the relevant patches. I think the breadcrumb trail matching the menu structure is a nice feature. Regards.
  • Oct 04, 2009
    issue 28 (Extending Menu Items breaks some unit tests) reported by richardbarran   -   As per subject line. We get errors such as: ====================================================================== ERROR: test_view_add_item (treemenus.tests.TreemenusTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/richard/workspace/sameeraSN/treemenus/tests.py", line 50, in test_view_add_item response = self.client.post('/test_treemenus_admin/treemenus/menu/%s/items/add/' % menu.pk, menu_item_data) File "/sw/lib/python2.5/site-packages/django/test/client.py", line 313, in post response = self.request(**r) File "/sw/lib/python2.5/site-packages/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/sw/lib/python2.5/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "/sw/lib/python2.5/site-packages/django/contrib/admin/sites.py", line 186, in inner return view(request, *args, **kwargs) File "/Users/richard/workspace/sameeraSN/treemenus/admin.py", line 128, in add_menu_item return menuitem_admin.add_view(request, extra_context={ 'menu': menu }) File "/sw/lib/python2.5/site-packages/django/db/transaction.py", line 240, in _commit_on_success res = func(*args, **kw) File "/sw/lib/python2.5/site-packages/django/contrib/admin/options.py", line 731, in add_view prefix=prefix) File "/sw/lib/python2.5/site-packages/django/forms/models.py", line 724, in __init__ queryset=qs) File "/sw/lib/python2.5/site-packages/django/forms/models.py", line 459, in __init__ super(BaseModelFormSet, self).__init__(**defaults) File "/sw/lib/python2.5/site-packages/django/forms/formsets.py", line 44, in __init__ self._construct_forms() File "/sw/lib/python2.5/site-packages/django/forms/formsets.py", line 87, in _construct_forms for i in xrange(self.total_form_count()): File "/sw/lib/python2.5/site-packages/django/forms/models.py", line 734, in total_form_count return super(BaseInlineFormSet, self).total_form_count() File "/sw/lib/python2.5/site-packages/django/forms/formsets.py", line 66, in total_form_count return self.management_form.cleaned_data[TOTAL_FORM_COUNT] File "/sw/lib/python2.5/site-packages/django/forms/formsets.py", line 54, in _management_form raise ValidationError('ManagementForm data is missing or has been tampered with') ValidationError: [u'ManagementForm data is missing or has been tampered with'] ---------------------------------------------------------------------- To be precise, the problem only occurs if you've extended the model AND added a new admin to manage it. I've attached a patch with a very simple fix: it skips the troublesome tests if the model has been extended. It "feels" to me like a bit of a hack, I can't think of a better solution at the moment but there probably is one!
    As per subject line. We get errors such as: ====================================================================== ERROR: test_view_add_item (treemenus.tests.TreemenusTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/richard/workspace/sameeraSN/treemenus/tests.py", line 50, in test_view_add_item response = self.client.post('/test_treemenus_admin/treemenus/menu/%s/items/add/' % menu.pk, menu_item_data) File "/sw/lib/python2.5/site-packages/django/test/client.py", line 313, in post response = self.request(**r) File "/sw/lib/python2.5/site-packages/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/sw/lib/python2.5/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "/sw/lib/python2.5/site-packages/django/contrib/admin/sites.py", line 186, in inner return view(request, *args, **kwargs) File "/Users/richard/workspace/sameeraSN/treemenus/admin.py", line 128, in add_menu_item return menuitem_admin.add_view(request, extra_context={ 'menu': menu }) File "/sw/lib/python2.5/site-packages/django/db/transaction.py", line 240, in _commit_on_success res = func(*args, **kw) File "/sw/lib/python2.5/site-packages/django/contrib/admin/options.py", line 731, in add_view prefix=prefix) File "/sw/lib/python2.5/site-packages/django/forms/models.py", line 724, in __init__ queryset=qs) File "/sw/lib/python2.5/site-packages/django/forms/models.py", line 459, in __init__ super(BaseModelFormSet, self).__init__(**defaults) File "/sw/lib/python2.5/site-packages/django/forms/formsets.py", line 44, in __init__ self._construct_forms() File "/sw/lib/python2.5/site-packages/django/forms/formsets.py", line 87, in _construct_forms for i in xrange(self.total_form_count()): File "/sw/lib/python2.5/site-packages/django/forms/models.py", line 734, in total_form_count return super(BaseInlineFormSet, self).total_form_count() File "/sw/lib/python2.5/site-packages/django/forms/formsets.py", line 66, in total_form_count return self.management_form.cleaned_data[TOTAL_FORM_COUNT] File "/sw/lib/python2.5/site-packages/django/forms/formsets.py", line 54, in _management_form raise ValidationError('ManagementForm data is missing or has been tampered with') ValidationError: [u'ManagementForm data is missing or has been tampered with'] ---------------------------------------------------------------------- To be precise, the problem only occurs if you've extended the model AND added a new admin to manage it. I've attached a patch with a very simple fix: it skips the troublesome tests if the model has been extended. It "feels" to me like a bit of a hack, I can't think of a better solution at the moment but there probably is one!
  • Sep 14, 2009
    issue 26 (can't override extrahead block of menuitem/change_form.html) commented on by jphalip   -   Yes you're right, the extra ".super" is useless and should be removed. However, to fix this properly we need to find a way to include the block content from the custom change_form.html template's grand parent (i.e. "admin/base_site.html"). This maybe could be done with a custom template tag since I don't think Django has anything like that built-in. I'll try to take a look at it one day. Patches are welcome ;)
    Yes you're right, the extra ".super" is useless and should be removed. However, to fix this properly we need to find a way to include the block content from the custom change_form.html template's grand parent (i.e. "admin/base_site.html"). This maybe could be done with a custom template tag since I don't think Django has anything like that built-in. I'll try to take a look at it one day. Patches are welcome ;)
  • Sep 14, 2009
    issue 27 (typos in MANUAL.txt) Status changed by jphalip   -   This is now fixed in trunk. Thank you!
    Status: Fixed
    This is now fixed in trunk. Thank you!
    Status: Fixed
  • Sep 14, 2009
    r53 (Fixed typo in doc. Thank you Richard Barran.) committed by jphalip   -   Fixed typo in doc. Thank you Richard Barran.
    Fixed typo in doc. Thank you Richard Barran.
  • Sep 14, 2009
    issue 27 (typos in MANUAL.txt) reported by richardbarran   -   File /docs/MANUAL.txt contains some typos: * {% show_menu "TopMenu" %) * {% show_menu "LeftMenu" "vertical" %) * {% show_menu "RightMenu" "horizontal" %) The trailing ) should be a }
    File /docs/MANUAL.txt contains some typos: * {% show_menu "TopMenu" %) * {% show_menu "LeftMenu" "vertical" %) * {% show_menu "RightMenu" "horizontal" %) The trailing ) should be a }
  • Sep 11, 2009
    issue 26 (can't override extrahead block of menuitem/change_form.html) reported by alexclau...@googlemail.com   -   What version of the product are you using? On what operating system? Django 1.0.2, treemenus r48 Please provide any additional information below. templates/treemenus/change_form.html has the following gem: {% comment %} We have to override this or the path to jsi18n will be wrong. Note the "super.super", as the direct parent has the wrong url. {% endcomment %} But, as far as I can see, block.super already evaluates to a unicode object, which of course does not have a "super" attribute..
    What version of the product are you using? On what operating system? Django 1.0.2, treemenus r48 Please provide any additional information below. templates/treemenus/change_form.html has the following gem: {% comment %} We have to override this or the path to jsi18n will be wrong. Note the "super.super", as the direct parent has the wrong url. {% endcomment %} But, as far as I can see, block.super already evaluates to a unicode object, which of course does not have a "super" attribute..
  • Jun 21, 2009
    issue 25 ([patch] some tests fails) commented on by jphalip   -   Thank you for the report and patch. I don't have the time to check it out in detail now because I'm too busy, but I'll give it proper attention later. Thanks, Julien
    Thank you for the report and patch. I don't have the time to check it out in detail now because I'm too busy, but I'll give it proper attention later. Thanks, Julien
  • Jun 20, 2009
    issue 25 ([patch] some tests fails) commented on by ivan.fedorov   -   Some comments: test_view_history_item fails on any localized installation of Django, so I'm modify TestCase for set English localisation. (Code copy-pasted from django.contrib.auth). test_move_item_or_clean_ranks fails because without implicit ordering declaration, DBMS doesn't guarantee any fixed ordering.
    Some comments: test_view_history_item fails on any localized installation of Django, so I'm modify TestCase for set English localisation. (Code copy-pasted from django.contrib.auth). test_move_item_or_clean_ranks fails because without implicit ordering declaration, DBMS doesn't guarantee any fixed ordering.
  • Jun 20, 2009
    issue 25 ([patch] some tests fails) reported by ivan.fedorov   -   What steps will reproduce the problem? 1. python manage.py test treemenus What is the expected output? ........... ---------------------------------------------------------------------- Ran 11 tests in 2.004s OK What do you see instead? .....F....F ====================================================================== FAIL: test_move_item_or_clean_ranks (treemenus.tests.TreemenusTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/django/projects/cjcdn_com/apps/treemenus/tests.py", line 572, in test_move_item_or_clean_ranks self.assertEquals(menu_item1.rank, 0) AssertionError: 3 != 0 ====================================================================== FAIL: test_view_history_item (treemenus.tests.TreemenusTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/django/projects/cjcdn_com/apps/treemenus/tests.py", line 78, in test_view_history_item self.assertTrue('Change history' in response.content) AssertionError ---------------------------------------------------------------------- Ran 11 tests in 1.924s FAILED (failures=2) What version of the product are you using? Django trunk (r11079) with russian language set.
    What steps will reproduce the problem? 1. python manage.py test treemenus What is the expected output? ........... ---------------------------------------------------------------------- Ran 11 tests in 2.004s OK What do you see instead? .....F....F ====================================================================== FAIL: test_move_item_or_clean_ranks (treemenus.tests.TreemenusTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/django/projects/cjcdn_com/apps/treemenus/tests.py", line 572, in test_move_item_or_clean_ranks self.assertEquals(menu_item1.rank, 0) AssertionError: 3 != 0 ====================================================================== FAIL: test_view_history_item (treemenus.tests.TreemenusTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/django/projects/cjcdn_com/apps/treemenus/tests.py", line 78, in test_view_history_item self.assertTrue('Change history' in response.content) AssertionError ---------------------------------------------------------------------- Ran 11 tests in 1.924s FAILED (failures=2) What version of the product are you using? Django trunk (r11079) with russian language set.
  • May 18, 2009
    issue 24 (Ukrainian translation) commented on by nickzam   -   Great! Thank you for django-treemenus project.
    Great! Thank you for django-treemenus project.
  • May 18, 2009
    issue 24 (Ukrainian translation) Status changed by jphalip   -   I've added these files to trunk and they will be part of the next release. Thanks a lot for your contribution!
    Status: Fixed
    I've added these files to trunk and they will be part of the next release. Thanks a lot for your contribution!
    Status: Fixed
 
Hosted by Google Code