forked from CGM_Public/pretix_original
Manage item properties
This commit is contained in:
20
src/tixlbase/migrations/0013_propertyvalue_position.py
Normal file
20
src/tixlbase/migrations/0013_propertyvalue_position.py
Normal 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,
|
||||
),
|
||||
]
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user