Le 31 janv. 2011 à 07:30, James Hancock a écrit :
> This post is getting pretty long. But I had a simple Django fix that would
> make it work a lot easier for me, and might help others. (I say this because
> of how I implemented it, I am working with about 60 different sites and it is
> a pret
This post is getting pretty long. But I had a simple Django fix that would
make it work a lot easier for me, and might help others. (I say this because
of how I implemented it, I am working with about 60 different sites and it
is a pretty simple arrangement)
Imagine you were able to set a site_id
I believe this ticket: http://code.djangoproject.com/ticket/14628
which was created during this chat session
http://www.revsys.com/officehours/2010/nov/05/#question5
is also relevant to the issue at hand.
An interesting bit of that chat is:
jacobkmnicoechaniz: one hint is that although the docu
Notice that I never suggested *django* to implement thread local hack,
it just allowes me to continue. The thread local hack is just that
hack, it hides the real problem for now since Django does not support
the stuff I need it to.
Settings object should be considered mainly read-only, if the stu
On Sun, Jan 30, 2011 at 2:20 AM, Russell Keith-Magee
wrote:
>
> Every single problem associated with using global variables exists
> with threadlocals -- and then a few more. They *can* be used
> successfully. However, in almost every case, they can also be avoided
> entirely with a good dose of r
In above I have error:
authbackend.save(session, user) -> bool
authbackend.load(session) -> user object
should be:
authbackend.save(request, user) -> bool
authbackend.load(request) -> user object
Since getting site id from request is the thing I need to do and save
it to session.
--
Y
With globals:
No patches to Django required. Flatpages, media urls, media roots can
be customed by request and works without single problem. Mostly
because settings are used like settings.SITE_ID etc. and not like
getattr(settings, 'SITE_ID') in apps.
If Django ever is patched to work without thi
On Jan 30, 7:20 am, Russell Keith-Magee
wrote:
> On Sat, Jan 29, 2011 at 8:55 PM, Jari Pennanen
> wrote:
> If an engineer came to their supervisor with a problem and said "I'm
> going to fix this problem with a global variable", they would be
> soundly beaten by any supervisor worth their salt
On Sun, Jan 30, 2011 at 2:11 PM, Russell Keith-Magee
wrote:
> On Sat, Jan 29, 2011 at 5:45 AM, Jacob Kaplan-Moss wrote:
>> On Fri, Jan 28, 2011 at 3:33 PM, Jacob Kaplan-Moss
>> wrote:
>>> I'm starting the switchover to the new djangoproject.com server right
>>> now. Might be around 5 mins of do