(using sqlalchemy 0.8.0b1) Using the new 8.0 inspection mechanism, I can perform the following on one of my model classes in an ipython or bpython shell and obtain a boolean result:
>>> [... bunch of imports to load up my model classes ...] >>> inspect(SomeClassOfMine).attr['foo'].columns[0].nullable True But it seems I can only do this successfully in a shell. When the same line of code is encountered at runtime, I get the following error: AttributeError: '_Label' object has no attribute 'nullable' Further info: this is in a shell initiated with respect to my Pyramid project by invoking "pshell -p bpython development.ini". What I'm actually trying to do: got some mako templates generating HTML forms from my model classes, and just want to have non-nullable fields generate the "required" keyword in my input elements. Perhaps there is another better way to reach the 'nullable' property of a column? Fishing for an easy answer here, but if none is forthcoming I'll knuckle down and build a testcase. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/y90dnrsvKZkJ. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.