/
vshmidt
/
django
Обзор
Документация
Войти
/
vshmidt
/
django
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/base/models.py
13 строк
435 B
Tim Graham
Sorted imports per isort 4.2.9.
01 июн 2017, 20:23
01 июн 2017, 20:23
cde31da
Код
Авторство
О чём код?
from django.db import models # The models definitions below used to crash. Generating models dynamically # at runtime is a bad idea because it pollutes the app registry. This doesn't # integrate well with the test suite but at least it prevents regressions. class CustomBaseModel(models.base.ModelBase): pass class MyModel(models.Model, metaclass=CustomBaseModel): """Model subclass with a custom base using metaclass."""