No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

models.py 730B

1234567891011121314151617
  1. from django.conf import settings
  2. from django.db import models
  3. from EditorialModel.migrationhandler.django import DjangoMigrationHandler
  4. from EditorialModel.migrationhandler.dummy import DummyMigrationHandler
  5. from EditorialModel.model import Model
  6. from EditorialModel.backend.json_backend import EmBackendJson
  7. if not settings.LODEL_MIGRATION_HANDLER_TESTS:
  8. me = Model(EmBackendJson('EditorialModel/test/me.json'), migration_handler = DummyMigrationHandler(True))
  9. dmh = DjangoMigrationHandler('LodelTestInstance', settings.DEBUG)
  10. models = dmh.em_to_models(me)
  11. elif settings.DEBUG:
  12. print("Making migrations tests, don't generate the models in the models.py file but within the migrations handler check process")