fix Source packageio
This commit is contained in:
parent
2d2cb4c826
commit
748c3ec7c4
2 changed files with 4 additions and 5 deletions
|
@ -10,7 +10,7 @@ MAPITEM_TYPES = OrderedDict()
|
|||
class MapItemMeta(ModelBase):
|
||||
def __new__(mcs, name, bases, attrs):
|
||||
cls = super().__new__(mcs, name, bases, attrs)
|
||||
if not cls._meta.abstract:
|
||||
if not cls._meta.abstract and name != 'Source':
|
||||
MAPITEM_TYPES[name.lower()] = cls
|
||||
return cls
|
||||
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
from django.db import models
|
||||
from django.db.models import Model
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from c3nav.mapdata.models.base import MapItem
|
||||
|
||||
class Source(Model):
|
||||
|
||||
class Source(MapItem):
|
||||
"""
|
||||
A map source, images of levels that can be useful as backgrounds for the map editor
|
||||
"""
|
||||
name = models.SlugField(_('Name'), unique=True, max_length=50)
|
||||
package = models.ForeignKey('mapdata.Package', on_delete=models.CASCADE, verbose_name=_('map package'))
|
||||
bottom = models.DecimalField(_('bottom coordinate'), max_digits=6, decimal_places=2)
|
||||
left = models.DecimalField(_('left coordinate'), max_digits=6, decimal_places=2)
|
||||
top = models.DecimalField(_('top coordinate'), max_digits=6, decimal_places=2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue