Closed GoogleCodeExporter closed 9 years ago
Hi,
A quick test here, it seems to be associated with the error 404 that
is raised in the default view:
if lang not in [key for (key, value) in settings.PAGE_LANGUAGES]:
raise Http404
wget http://76.12.209.254/individual/why-us <-- 404
wget http://76.12.209.254/individual/why-us --header='Accept-Language:
en' <--- 200 ok
Original comment by batiste....@gmail.com
on 12 Sep 2010 at 11:08
Wow! I'm super impressed by how quickly you got back to me.
That's a great find. I've got the CMS setup only to use English. And wget is
returning 'en-us' rather than just 'en'. Curl is also sending 'en-us' so that
seems to be the problem.
I had some problems very early on using 'en-us' in the settings file for the
languages. Should I be doing something differently? Is there a way to map
'en-us' to just 'en' elegantly?
Original comment by Vade...@gmail.com
on 12 Sep 2010 at 11:55
Hi,
For the language mapping you have this:
http://packages.python.org/django-page-cms/settings-list.html#page-language-mapp
ing
But there is definitely something wrong happening. I don't think you should get
this 404 error ever.
If you find out exactly what is the source of the error, please tell me so I
can try to fix it in the CMS.
Original comment by batiste....@gmail.com
on 13 Sep 2010 at 8:59
Here is a change on the way the CMS deal with language that might solve your
issue.
http://github.com/batiste/django-page-cms/commit/16be87d5003a3114baf0ebed746aa85
430120c56
But I still believe that there is something weird in your config. If
PAGE_LANGUAGES != LANGUAGES, you should be sure that the mapping function is
mapping all the extra languages properly to an language listed in the
PAGE_LANGUAGES setting.
Original comment by batiste....@gmail.com
on 13 Sep 2010 at 9:34
Yes, I think you're right that I'm doing something wrong. Here's the relevant
portion of my settings.py file:
PAGE_DEFAULT_LANGUAGE = 'en'
# page languages
PAGE_LANGUAGES = (
( 'en', gettext('US English')),
)
Original comment by Vade...@gmail.com
on 13 Sep 2010 at 3:58
Did you manage to fix the issue? Can I close this bug?
Original comment by batiste....@gmail.com
on 24 Sep 2010 at 8:12
I just ran across this bug. The new code has fixed the issue here. Thanks!
Original comment by jonrh...@gmail.com
on 5 Oct 2010 at 1:48
Original comment by batiste....@gmail.com
on 9 Oct 2010 at 9:21
Original issue reported on code.google.com by
Vade...@gmail.com
on 12 Sep 2010 at 10:15Attachments: