On Aug 9, 12:13 pm, Kejun He <printer...@gmail.com> wrote: > On Tue, Aug 9, 2011 at 5:54 PM, bruno desthuilliers < > > > > DONT import settings that way. ALWAYS use "from django.conf import > > settings" > > I test in my development server, and found that > > from django.conf import settings is to all client > > but > > import settings is to a singal one
I don't understand what you mean here. But anyway: the only correct way to import your project's settings module is to use the first form. It #1 respects the --settings option of ./manage.py (or the $DJANGO_SETTINGS_MODULE environment variable - cf deploying on mod_wsgi), and #2 makes sure you have the default values for what you didn't set in you settings file. > > > > then assign request.user to settings.CURRENT_USER > > > Question: what do you think will happen in a multithreaded > > environment ? > > I just test it on my development server, and it could work normally when > there are several users. I'm talking about multithreaded environment here. > And have not test it in a multithreaded environment. Please do. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.