remove editor.utils because nearly nothing in it was used

This commit is contained in:
Laura Klünder 2017-11-30 15:52:02 +01:00
parent af93cd2aa2
commit 1f80f2daa6
5 changed files with 7 additions and 42 deletions

View file

@ -9,7 +9,6 @@ from django.db import models
from django.db.models import FieldDoesNotExist, Manager, ManyToManyRel, Prefetch, Q
from django.utils.functional import cached_property
from c3nav.editor.utils import is_created_pk
from c3nav.mapdata.utils.models import get_submodels
@ -174,6 +173,10 @@ class ModelWrapper(BaseWrapper):
return '<ModelWrapper '+repr(self._obj.__name__)+'>'
def is_created_pk(pk):
return isinstance(pk, str) and pk.startswith('c') and pk[1:].isnumeric()
class ModelInstanceWrapper(BaseWrapper):
"""
Wraps a model instance. Don't use this directly, call a ModelWrapper instead / use ChangeSet.wrap().