Manage item properties

This commit is contained in:
Raphael Michel
2014-10-04 19:42:36 +02:00
parent 65091b71d4
commit e10267ebd0
14 changed files with 398 additions and 7 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('tixlbase', '0012_auto_20140929_1935'),
]
operations = [
migrations.AddField(
model_name='propertyvalue',
name='position',
field=models.IntegerField(default=0),
preserve_default=True,
),
]

View File

@@ -393,10 +393,18 @@ class PropertyValue(models.Model):
max_length=250,
verbose_name=_("Value"),
)
position = models.IntegerField(
default=0
)
def __str__(self):
return "%s: %s" % (self.prop.name, self.value)
class Meta:
verbose_name = _("Property value")
verbose_name_plural = _("Property values")
ordering = ("position",)
class Item(models.Model):
"""