class ModelState:
Represent a Django Model. Don't use the actual Model class as it's not designed to have its options changed - instead, mutate this one and then render it into a Model as required.
Note that while you are allowed to mutate .fields, you are not allowed to mutate the Field instances inside there themselves - you must instead assign new ones, as these are not detached during a clone.
Class Method | from_model |
Given a model, return a ModelState representing it. |
Method | __eq__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | clone |
Return an exact copy of this ModelState. |
Method | construct_managers |
Deep-clone the managers using deconstruction. |
Method | get_constraint_by_name |
Undocumented |
Method | get_field |
Undocumented |
Method | get_index_by_name |
Undocumented |
Method | render |
Create a Model object from our current state into the given apps. |
Instance Variable | app_label |
Undocumented |
Instance Variable | bases |
Undocumented |
Instance Variable | fields |
Undocumented |
Instance Variable | managers |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | options |
Undocumented |
Property | name_lower |
Undocumented |