mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-04-25 01:14:43 +00:00
Remove verbose_name and add documentation
This commit is contained in:
parent
2c5e1e6602
commit
aaaa813b9b
2 changed files with 8 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ class Migration(migrations.Migration):
|
|||
('modified', models.DateTimeField(auto_now=True, verbose_name='Modified')),
|
||||
('required', models.BooleanField(default=False, verbose_name='Required')),
|
||||
('display_order', models.PositiveIntegerField(default=1, verbose_name='Display order')),
|
||||
('entity_ct', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='attribute_entities', to='contenttypes.ContentType', verbose_name='Belongs to')),
|
||||
('entity_ct', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='attribute_entities', to='contenttypes.ContentType')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['name'],
|
||||
|
|
|
|||
|
|
@ -189,9 +189,14 @@ class Attribute(models.Model):
|
|||
null = True,
|
||||
blank = True,
|
||||
on_delete = models.PROTECT,
|
||||
related_name = 'attribute_entities',
|
||||
verbose_name = _('Belongs to')
|
||||
related_name = 'attribute_entities'
|
||||
)
|
||||
"""
|
||||
This field allows you to specify a foreign key to a content type.
|
||||
This would be useful, for example, if you wanted an attribute to apply only to one entity.
|
||||
In that case, you could filter by content type in the :meth:`~eav.registry.EavConfig.get_attributes`
|
||||
method of that entity's config.
|
||||
"""
|
||||
|
||||
enum_group = models.ForeignKey(
|
||||
EnumGroup,
|
||||
|
|
|
|||
Loading…
Reference in a new issue