add a scope attribute to Attribute (#21769)
This commit is contained in:
parent
93cc7e363f
commit
fcc3a92bff
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentic2', '0021_attribute_order'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='attribute',
|
||||
name='scopes',
|
||||
field=models.CharField(default=b'', help_text='scopes separated by spaces', max_length=256, verbose_name='scopes', blank=True),
|
||||
),
|
||||
]
|
|
@ -151,6 +151,13 @@ class Attribute(models.Model):
|
|||
verbose_name=_('searchable'),
|
||||
blank=True, default=False)
|
||||
|
||||
scopes = models.CharField(
|
||||
verbose_name=_('scopes'),
|
||||
help_text=_('scopes separated by spaces'),
|
||||
blank=True,
|
||||
default='',
|
||||
max_length=256)
|
||||
|
||||
order = models.PositiveIntegerField(
|
||||
verbose_name=_('order'),
|
||||
default=0)
|
||||
|
|
|
@ -87,6 +87,7 @@ class SerializerTests(TestCase):
|
|||
'disabled': False,
|
||||
'searchable': False,
|
||||
'order': 0,
|
||||
'scopes': '',
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue