How to start django session on demand?

when using django middleware, for every new visitor, a new session record or session file is created. this is fine except for websites where a large traffic part do not need session (exemple : a blog that is seen by many but written by only one).Is it possible to have the session middleware activated only for some urls so many I/Os will be saved ?

Answers


This is actually not true. Sessions are lazily created, so only if data is put in the session a new record is created. Have a look here:

https://github.com/django/django/blob/master/django/contrib/sessions/middleware.py#L27


Need Your Help

which .NET API will allow me to programmatically rename the contents of a zip file without having to unzip and re-zip the zip file?

.net api zip

I'm looking for a .NET open source API that will allow me to open a zip file (without actually extracting its contents), get a list of files, and then rename them, all without having to unzip and r...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.