HEAD requests

2010-02-03 Thread Mike Burrows
When routes have conditions that constrain the request method to GET, any HEAD requests result in 405 Method Not Allowed. Bug or feature? With HEAD added as an allowed method, the server (paster) does the right thing and returns a zero-length body. Working around this in one's routing isn't

Re: HEAD requests

2010-02-03 Thread Graham Dumpleton
You may find my blog post about GET/HEAD and WSGI interesting. http://blog.dscpl.com.au/2009/10/wsgi-issues-with-http-head-requests.html Because of Python web frameworks doing all sort of odd things and not always handling HEAD properly, I in part felt that WSGI adapters should always just

Re: HEAD requests

2010-02-03 Thread Mike Burrows
Yes, your article came up high in my research and it was very interesting (in the sense of slightly worrisome!). Your subscriber count went up by one this morning :-) Reassured somewhat that I'm thinking along the right lines I'm tempted to get something working and then submit a patch. I

Re: Do your models handle all the data logic?

2010-02-03 Thread Thomas G. Willis
On Sun, Jan 31, 2010 at 7:09 AM, Haron Media i...@haronmedia.com wrote: I wonder how you build your models, do they handle all the data logic? ...snip... I wonder what other patterns would you guys use? Vlad Little late chiming in here. In the past I've tried to fully utilize all the

Re: Caching all but 1 variable.

2010-02-03 Thread Haron Media
On 02/02/2010 09:07 PM, Andy (Zenom) wrote: Basically I have a site that I need to carry an affiliate code through, but would like to cache the final template result, minus that one variable. This way all the major part of the content is cached, but the affiliate code can be inserted into

Re: Do your models handle all the data logic?

2010-02-03 Thread Jonathan Vanasco
I use PostgreSQL exclusively too, and rely on tons of constraints within the db - from unique indexes built through functions, to actual functions themselves. I still, pretty much, always query the db to check for a duplicate value or possible constraint violation. 1- It's easier than parsing

Re: Do your models handle all the data logic?

2010-02-03 Thread Haron Media
On 02/01/2010 11:09 PM, Aurynn Shaw wrote: Yes, this is exactly the problem that Exceptable is designed to solve. If you can give me an exact example of the constraint error, I can add a check into Exceptable proper. Well I mostly rely on the Exception 23505 which is constraint violation. I

difference between use c. or extra_vars to pass variables to templates

2010-02-03 Thread Black Hand
Hi Ppl exist any real difference if y pass a variable in context (c. ) or pass directly using extra_vars ? threading considerations ? performance ? any consideration in template engine (we are using jinja2 now) iirc access objects atributes take slightly more time that access objects in the

Sessions over both HTTP and HTTPS with Pylons

2010-02-03 Thread Michael Naber
Hello, I have a couple questions about sessions and HTTP/HTTPS that I'm hoping someone can help answer. I'm pretty new to Pylons and web programming, so try not to assume I know too much in your replies. Thanks a lot! I am developing a site that will be viewed over both HTTP and HTTPS. There will

Re: difference between use c. or extra_vars to pass variables to templates

2010-02-03 Thread Mike Orr
On Wed, Feb 3, 2010 at 8:48 AM, Black Hand yonsy.so...@gmail.com wrote: Hi Ppl exist any real difference if y pass a variable in context (c. ) or pass directly using extra_vars ? threading considerations ? performance ? any consideration in template engine (we are using jinja2 now) 'c' was