Ok- should be a trivial patch. It seems as though 'self.default' is a string set to 'oijpwojefiojpanv' when not set with a parameter in the models definition.
Whuh?
Otherwise, it's as easy as...
if f.default <> 'oijpwojefiojpanv':
field_output.append("DEFAULT '%s'" % (f.default,))
Only tested on PgSQL
