[albatross-users] Patch to 1.11pre2

Andrew McNamara andrewm at object-craft.com.au
Wed Jan 7 15:55:05 EST 2004


>I went though the TODO list with 1.11pre2 and fixed the items I reported:
>
>* <al-input type="image"> is confusing. Consider having ctx.req_equals()
>check for "name.x" if "name" doesn't exist? Should at least mention it in
>the section of the manual that talks about tags (Michael C.  Neel).
>
>---> ctx.req_equals() will return true for input type=image with only the
>name given

We record the input type - it might be possible to avoid the second test.
I'll have to look at the code.

>* Allow multiple Cookie values to be set (Michael C. Neel).
>
>---> Biggest change made here.  The headers mixin now keeps a list of
>values for each header, which also means get_header returns a list.  I
>opted for get_headers to always return a list as it's consistent, but it
>could be changed to only return a list on more than one value to remain
>backwards compatible.  Also, this does not work with the httpdapp.py
>request class, as it keeps headers as a dict internally so doesn't handle
>duplicate keys.  the apacheapp.py was changed to use the add(key, val)
>method of mod_python to handle the dupes.

Does it look like httpdapp could be fixed easily enough?

Other than that, this is a desirable change.

>* ctx.add_session_vars() should create non-existent varaibles with value
>of None (Michael C. Neel).
>
>---> Does just that now.

I think I like the old behaviour better - raise an exception - it's saved
my bacon on several occasions now, and makes debugging quicker. Setting
to None feels too implicit/magical/perl-like. 8-)

>* Second submission of form will return ctx.req_equals() TRUE for empty
>fields (Michael C. Neel).
>
>---> I couldn't get this to occur on 1.11pre2, so I consider it fixed =)

Yep... a year ago... 8-)

2002-12-05 14:45  andrewm

	* albatross/app.py: Make req_equals return true if the request
	evaluates true, rather than "not None" - this allows null strings to
	return false (found by Michael C. Neel).  

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list