Ticket #12999: management.diff
File management.diff, 545 bytes (added by , 15 years ago) |
---|
-
management.py
7 7 Creates content types for models in the given app, removing any model 8 8 entries that no longer have a matching model class. 9 9 """ 10 db = kwargs ['db']10 db = kwargs.get('db',None) 11 11 ContentType.objects.clear_cache() 12 12 content_types = list(ContentType.objects.using(db).filter(app_label=app.__name__.split('.')[-2])) 13 13 app_models = get_models(app)