admin home page shows no permission to do anything

2008-10-30 Thread Chuck Bai2
I got the following message when login as superuser to admin home page: * You don't have permission to edit anything. * Recent Actions My Actions None available I delete all my database tables and regenerate them through syncdb, but it did not help. The login/logout part is worki

UnicodeDecodeError when Unicode is used in view

2008-10-23 Thread Chuck Bai2
I have a contact form which send email. It is working fine. But when I try to add two Unicode to subject line: subject = "DOMAIN.COM 留言 - %s (%s)" % (full_name,location) I got the following error message: UnicodeDecodeError at /contact_us/ 'ascii' codec can't decode byte 0xe7 in position

render_to_response failed to render media files in base.html

2008-10-19 Thread Chuck Bai2
Here is my view code: def contact(request): form = ContactForm() # An unbound form return render_to_response('contact.html', { 'form': form, }) My contact form page rendered but without all the media files(CSS files, Javascripts files, images). The text part of the page is O

makemessages create invalid msgid in django.po file

2008-10-12 Thread Chuck Bai2
The base language of my site is Chinese. I want to change to English when user select language perferrence. In my base.html, I have {% trans "产品" %} I generated django.po file using django-admin.py makemessages -l en In django.po file of en locale, #: .\templates\base.html.py:36 msgid "å…¬å ¸ä

change i18n language through hyperlinks

2008-10-09 Thread Chuck Bai2
I want to allow user select language preference through clicking the language hyperlinks like "_English_ | _French_" switch. And I also want to redirect back to the previous page after clicking the language switch. Is it possible to use Django view: django.views.i18n.set_language? In the docum