1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

More conversion to a ContextManager schema_editor

This commit is contained in:
Andrew Godwin
2013-05-18 11:48:46 +02:00
parent ce5bd42259
commit 331546f6ee
3 changed files with 215 additions and 312 deletions

View File

@@ -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):
"""