views:

35

answers:

1

I am trying to implement the photologue django photo gallery here:

http://skam.webfactional.com/blog/2007/08/08/django-based-photo-gallery-tutorial/

I dont understand this part:

You need to have the current user’s info outside requests, have a look at CookBookThreadlocalsAndUser and add the middleware in your “MIDDLEWARE_CLASSES” settings.

Here the Link to CookBookThreadlocalsandUser:

http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser

What Middleware do I have to install? What exactly is Threadlocals? Is it possible to install this without fully understanding Threadlocals:

http://en.wikipedia.org/wiki/Thread-local_storage

A: 

That blog entry is nearly three years old. Django has moved on considerably since then, and threadlocals - which was never anything more than a hack - is now officially warned against.

That's not the only thing that is out of date in that tutorial - all the references to admin are also now completely wrong.

However, that tutorial does not seem to have anything to do with photologue - it's a description of how to build your own custom gallery. Why don't you look at the actual Photologue documentation which appears to be very comprehensive?

Daniel Roseman
Thanks for the answer! I have been to the official documentation. What I am looking for is an example code/project to understand the basics.
MacPython