Corrected CustomField ordering

This commit is contained in:
Jeremy Stretch 2016-08-23 12:25:23 -04:00
parent 4a2e80aeee
commit 25c46894b4
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-23 16:10
# Generated by Django 1.10 on 2016-08-23 16:24
from __future__ import unicode_literals
from django.db import migrations, models
@ -28,7 +28,7 @@ class Migration(migrations.Migration):
('obj_type', models.ManyToManyField(help_text=b'The object(s) to which this field applies.', related_name='custom_fields', to='contenttypes.ContentType', verbose_name=b'Object(s)')),
],
options={
'ordering': ['name'],
'ordering': ['weight', 'name'],
},
),
migrations.CreateModel(

View File

@ -97,7 +97,7 @@ class CustomField(models.Model):
"form")
class Meta:
ordering = ['name']
ordering = ['weight', 'name']
def __unicode__(self):
return self.label or self.name.replace('_', ' ').capitalize()