Django SVN request.get_full_path() return main.fcgi?

2008-08-30 Thread Jason Cui

When I update django SVN yestoday, about from 0.97 to 1.0 beta2, the
function request.get_full_path() return wrong value sometimes. When I
locate url http://domain/detail/list/, this function return /main.fcgi/
detail/list/, but should be /detail/list/.

Who can tell me why? Now I have to add replace function to this value.

My server config: django+fastcgi 1.4.18+fastcgi, the main.fcgi file in
the public directory only has on line:
export DJANGO_SETTINGS_MODULE=web.settings_fastcgi

Thanks a lot.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django SVN request.get_full_path() return main.fcgi?

2008-08-31 Thread Jason Cui

Thank you very much, this is the answer.

On Aug 31, 11:13 pm, Michael Richardson
<[EMAIL PROTECTED]> wrote:
> On Aug 30, 11:07 pm, Jason Cui <[EMAIL PROTECTED]> wrote:
>
> > When I update django SVN yestoday, about from 0.97 to 1.0 beta2, the
> > function request.get_full_path() return wrong value sometimes. When I
> > locate urlhttp://domain/detail/list/, this function return /main.fcgi/
> > detail/list/, but should be /detail/list/.
>
> > Who can tell me why? Now I have to add replace function to this value.
>
> > My server config: django+fastcgi 1.4.18+fastcgi, the main.fcgi file in
> > the public directory only has on line:
> > export DJANGO_SETTINGS_MODULE=web.settings_fastcgi
>
> Do you have FORCE_SCRIPT_NAME = '' in your settings.py file? 
> Seehttp://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Chang...
> andhttp://www.djangoproject.com/documentation/fastcgi/#forcing-the-url-p...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



My site die every two hours

2008-09-02 Thread Jason Cui

This happend after I update django to newest svn version from 0.97.
When the site died, my server is running ok, login with ssh, I found
there were so many manage.py process. After restart the site use
manage.py or restart system, the site come back.
Any suggestion?

This is the startup bash:
python manage.py runfcgi socket=$SOCKET pidfile=$PIDFILE --
settings=web.settings_fastcgi

Now I add  maxspare=10 minspare=5 maxchildren=40 for this command and
test a while.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: My site die every two hours

2008-09-02 Thread Jason Cui

Sorry, it's my fault, the DEBUG is setted to true in settings file.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: Security fix to i18n framework

2007-10-29 Thread Jason Cui

And more,when I update the django to svn trunk, my site is down, it
only show IE's 500 error, and I can't find the details.
I use lighttpd+FastCGI, there is no message in the error log file.
And, I use the DualSessionMiddleware class for the "Remember me"
function, but the session middleware is changed from 0.96, this
middleware don't work any more, what should I do?

Thanks for any help.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: Security fix to i18n framework

2007-10-29 Thread Jason Cui

When I update my site from 0.96 to 0.96.1,my internationalize function
won't work for firefox, but fine for IE.
I use english in views and templates, and trans it to chinese in po
file, and I have to local folder named en and zh, now, any firefox
users can only see english page, change the language options is
useless, but IE has no problem, show chinese page.
Any suggestion?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: Security fix to i18n framework

2007-10-30 Thread Jason Cui
2007/10/31, Malcolm Tredinnick <[EMAIL PROTECTED]>:
>
>
> On Tue, 2007-10-30 at 00:37 -0700, Jason Cui wrote:
> > When I update my site from 0.96 to 0.96.1,my internationalize function
> > won't work for firefox, but fine for IE.
> > I use english in views and templates, and trans it to chinese in po
> > file, and I have to local folder named en and zh, now, any firefox
> > users can only see english page, change the language options is
> > useless, but IE has no problem, show chinese page.
>
> Can anybody else confirm this?
>
> Malcolm
>
If my firefox's language setting has only zh and zh_cn options, it will show
chinese page,
when I add en to this setting, it will always show english page, even if I
set en as the last one.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to write the new DualSessionMiddleware for django trunk?

2007-10-30 Thread Jason Cui

I use this code for the "Remember me" function:
http://code.djangoproject.com/wiki/CookBookDualSessionMiddleware
But then I update django from 0.96 to svn trunk, it won't work,
because the session middleware of django have not SessionWrapper class
any more.
What should I do now?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: Security fix to i18n framework

2007-10-31 Thread Jason Cui
2007/10/31, Jeremy Dunck <[EMAIL PROTECTED]>:
>
>
> On 10/31/07, Jason Cui <[EMAIL PROTECTED]> wrote:
> > 2007/10/31, Malcolm Tredinnick <[EMAIL PROTECTED]>:
> > >
> > > On Tue, 2007-10-30 at 00:37 -0700, Jason Cui wrote:
> > > > When I update my site from 0.96 to 0.96.1,my internationalize
> function
> > > > won't work for firefox, but fine for IE.
> > > > I use english in views and templates, and trans it to chinese in po
> > > > file, and I have to local folder named en and zh, now, any firefox
> > > > users can only see english page, change the language options is
> > > > useless, but IE has no problem, show chinese page.
> > >
> > > Can anybody else confirm this?
> > >
> > > Malcolm
> > >
> >
> > If my firefox's language setting has only zh and zh_cn options, it will
> show
> > chinese page,
> > when I add en to this setting, it will always show english page, even if
> I
> > set en as the last one.
> >
>
> Please use a tool like Wireshark or LiveHttpHeaders to show us what
> your Accept-Language header has.
>
> Providing this info would give bonus points (ripped from LocaleMiddleware
> docs):
>
>* a django_language key in the the current user's session.
>* a cookie called django_language.
>* Accept-Language HTTP header.
>* the global LANGUAGE_CODE setting.
>
> >
>
The problem is: my program has no change, and my firefox too, it just don't
work anymore after I upgrade django,
before that, it works fine.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: Security fix to i18n framework

2007-10-31 Thread Jason Cui
2007/10/31, Jeremy Dunck <[EMAIL PROTECTED]>:
>
>
> On 10/31/07, Jason Cui <[EMAIL PROTECTED]> wrote:
> > 2007/10/31, Malcolm Tredinnick <[EMAIL PROTECTED]>:
> > >
> > > On Tue, 2007-10-30 at 00:37 -0700, Jason Cui wrote:
> > > > When I update my site from 0.96 to 0.96.1,my internationalize
> function
> > > > won't work for firefox, but fine for IE.
> > > > I use english in views and templates, and trans it to chinese in po
> > > > file, and I have to local folder named en and zh, now, any firefox
> > > > users can only see english page, change the language options is
> > > > useless, but IE has no problem, show chinese page.
> > >
> > > Can anybody else confirm this?
> > >
> > > Malcolm
> > >
> >
> > If my firefox's language setting has only zh and zh_cn options, it will
> show
> > chinese page,
> > when I add en to this setting, it will always show english page, even if
> I
> > set en as the last one.
> >
>
> Please use a tool like Wireshark or LiveHttpHeaders to show us what
> your Accept-Language header has.
>
> Providing this info would give bonus points (ripped from LocaleMiddleware
> docs):
>
>* a django_language key in the the current user's session.
>* a cookie called django_language.
>* Accept-Language HTTP header.
>* the global LANGUAGE_CODE setting.
>
> >
>
The Accept-Language header is : zh-cn,zh;q=0.7,en;q=0.3
I think this is correct header, right?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: Security fix to i18n framework

2007-11-01 Thread Jason Cui
2007/10/31, Malcolm Tredinnick <[EMAIL PROTECTED]>:
>
>
> On Wed, 2007-10-31 at 13:40 +0800, Jason Cui wrote:
> > 2007/10/31, Malcolm Tredinnick <[EMAIL PROTECTED]>:
> >
> > On Tue, 2007-10-30 at 00:37 -0700, Jason Cui wrote:
> > > When I update my site from 0.96 to 0.96.1,my
> > internationalize function
> > > won't work for firefox, but fine for IE.
> > > I use english in views and templates, and trans it to
> > chinese in po
> > > file, and I have to local folder named en and zh, now, any
> > firefox
> > > users can only see english page, change the language options
> > is
> > > useless, but IE has no problem, show chinese page.
> >
> > Can anybody else confirm this?
> >
> > Malcolm
> > If my firefox's language setting has only zh and zh_cn options, it
> > will show chinese page,
> > when I add en to this setting, it will always show english page, even
> > if I set en as the last one.
>
> I've had some time now to look at this.
>
> It turns out that security bugfix has exposed a different bug in Django.
> It will only show up for the zh-cn, zh-tw and pt-br locales, which is
> why it wasn't noticed during testing prior to the security release.
>
> The workaround for now is to open up django/conf/global_settings.py and,
> in the LANGUAGES list, find the line that says
>
>('zh-cn', gettext_noop('Simplified Chinese')),
>
> and replace it with
>
>('zh_CN', gettext_noop('Simplified Chinese')),
>
> (For completeness, make similar changes to the zh-tw and pt-br lines,
> too. Replace the trailing hyphen and country modifier with an underscore
> and the all-capital-letter version.)
>
> I'm pretty sure this is the right (as in "simplest") fix for this
> problem globally, too. So it'll probably be what we end up landing in
> trunk. I'll talk to the other maintainers about whether we want to
> quickly make new releases or what to do here to mitigate this.
>
> Apologies for the temporary problems this has caused. We try our best,
> but sometimes things fall through the cracks.
>
> Regards,
> Malcolm
>
>
>
Thank you very much for your excellent work.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---