Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1 bug: menu_pool does not setup for without cms multilingual middleware #424

Closed
indexofire opened this issue Apr 9, 2010 · 1 comment

Comments

@indexofire
Copy link
Contributor

if you not using cms.middleware.multilingual.MultilingualURLMiddleware, your template's show_menu will report a error such as "Caught AttributeError while rendering: 'WSGIRequest' object has no attribute 'LANGUAGE_CODE'" and the traceback's answer is at menu_pool.py line 43:

so shoud the source be like this in menu_pool?

def _build_nodes(self, request, site_id):
lang = getattr(request, 'LANGUAGE_CODE', 'settings.LANGUAGES_CODE')

@indexofire
Copy link
Contributor Author

fixed by:
lang = get_language()

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant