Re: Django Flatpage Internationalization BUG
So just put your http://localhost:PORT if you're in development, or the real link if you are in production
:D
2009/12/7 Cyberbiagio <cyberbiagio@gmail.com>
Thanks for your suggestion but in site there is mysite.com and the
sites_id is correctly linked to flat page id
:(
On 7 Dic, 14:42, Carlos Ricardo Santos <carlosricardosan...@gmail.com>
wrote:
> Check in the admin panel if you have linked it to a site, then check
> settings.Py if the site_id matches the id of the site you associated in the
> admin.
>
> On Dec 7, 2009 12:08 PM, "Cyberbiagio" <cyberbia...@gmail.com> wrote:> "http://about-us//" instead ofhttp://www.mysite.com/en-about-us/
>
> Hi,
>
> i'm a new django developer, i need help for a strange bug:
>
> I have a web sit in 2 languages: en, es
> In this website the Internationalization system (i18n) works fine in
> exception for the only flatpage that i have.
> In fact when the user is on that web page (named "about-us") if he
> change language with the language-flag, the page does not update
> itself.
> So i need (i think) to redirect the page by urls.py to flatpage.view
> manually but i receive a strange url in my browser address bar:
>> django-users+unsubscribe@googlegroups.com<django-users%2Bunsubscribe@google groups.com>
> Here the code:
>
> Base.html (button link):
>
> <a href="{% url flatpage_translate "about-us" %}">
>
> Urls.py:
>
> url(r'^(?P<slug>[a-zA-Z0-9-_]+)/
> $','PROJECTNAME.APPNAME.views.translated_url',
> {},name='flatpage_translate'),
>
> Views.py:
>
> from django.utils import translation
> from django.contrib.flatpages.views import flatpage
>
> def translated_url(request,slug):
> curr_lang = translation.get_language()
> return flatpage(request,'/%s-%s'%(curr_lang,slug))
>
> I hope anyone can help me.
>
> Thank You very much!
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> .
> For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
Cumprimentos,
Carlos Ricardo Santos
--
You received this message because you are subscribed to the Google Groups "Django users" group.To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home