askbot.importers.stackexchange.parse_models

class askbot.importers.stackexchange.parse_models.DjangoFK(source_name)

Bases: askbot.importers.stackexchange.parse_models.DjangoField

get_relation()
set_relation(name)

some relations need to be mapped to actual tables

class askbot.importers.stackexchange.parse_models.DjangoField(name, type, restriction=None)

Bases: object

get_type()
class askbot.importers.stackexchange.parse_models.DjangoModel(name)

Bases: object

add_field(field)
class askbot.importers.stackexchange.parse_models.DjangoPK

Bases: askbot.importers.stackexchange.parse_models.DjangoField

askbot.importers.stackexchange.parse_models.camel_to_python(camel)

http://stackoverflow.com/questions/1175208/

askbot.importers.stackexchange.parse_models.get_col_type(col)
askbot.importers.stackexchange.parse_models.get_table_name(name)

Determine db table name from the basename of the .xml file

askbot.importers.stackexchange.parse_models.make_field_from_xml_tree(xml_element)

used by the model parser here we need to be detailed about field types because this defines the database schema

askbot.importers.stackexchange.parse_models.parse_field_name(input)

used by the data reader

The problem is that I’ve scattered code for determination of field name over three classes: DjangoField, DjangoPK and DjangoFK so the function actually cretes fake field objects many time over

askbot.importers.stackexchange.parse_models.parse_value(input, field_object)
askbot.importers.stackexchange.parse_models.singular(word)

This Page