mirror of
https://github.com/django/django.git
synced 2025-08-21 19:14:36 +00:00
More conversion to a ContextManager schema_editor
This commit is contained in:
parent
ce5bd42259
commit
331546f6ee
3 changed files with 215 additions and 312 deletions
|
@ -30,6 +30,12 @@ class ProjectState(object):
|
|||
model.render(self.app_cache)
|
||||
return self.app_cache
|
||||
|
||||
@classmethod
|
||||
def from_app_cache(cls, app_cache):
|
||||
"Takes in an AppCache and returns a ProjectState matching it"
|
||||
for model in app_cache.get_models():
|
||||
print model
|
||||
|
||||
|
||||
class ModelState(object):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue