Author: antoni.aloy
Date: Mon Mar 2 10:37:35 2009
New Revision: 374
Modified:
trunk/pages/admin/__init__.py
Log:
fixes #67. Firs checks if there is a language and if not it reverts to the
default settings
Modified: trunk/pages/admin/__init__.py
==============================================================================
--- trunk/pages/admin/__init__.py (original)
+++ trunk/pages/admin/__init__.py Mon Mar 2 10:37:35 2009
@@ -212,7 +212,7 @@
form = super(PageAdmin, self).get_form(request, obj, **kwargs)
language = get_language_from_request(request, obj)
- form.base_fields['language'].initial =
settings.PAGE_DEFAULT_LANGUAGE
+ form.base_fields['language'].initial = language or
settings.PAGE_DEFAULT_LANGUAGE
if obj:
initial_slug = obj.slug(language=language, fallback=False)
initial_title = obj.title(language=language, fallback=False)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---