Add widget support to SourceColumn
Allow passing a widget class to SourceColumn. This makes using lambdas to render model column unnecesary and are mostly removed too. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -121,16 +121,17 @@ class FileMetadataApp(MayanAppConfig):
|
||||
model=DocumentTypeSettings, related='document_type',
|
||||
)
|
||||
|
||||
SourceColumn(source=FileMetadataEntry, attribute='key')
|
||||
SourceColumn(source=FileMetadataEntry, attribute='value')
|
||||
SourceColumn(attribute='key', source=FileMetadataEntry)
|
||||
SourceColumn(attribute='value', source=FileMetadataEntry)
|
||||
SourceColumn(
|
||||
source=DocumentVersionDriverEntry, attribute='driver'
|
||||
attribute='driver', source=DocumentVersionDriverEntry
|
||||
)
|
||||
SourceColumn(
|
||||
source=DocumentVersionDriverEntry, attribute='driver__internal_name'
|
||||
attribute='driver__internal_name',
|
||||
source=DocumentVersionDriverEntry
|
||||
)
|
||||
SourceColumn(
|
||||
source=DocumentVersionDriverEntry, attribute='get_attribute_count'
|
||||
attribute='get_attribute_count', source=DocumentVersionDriverEntry
|
||||
)
|
||||
|
||||
app.conf.task_queues.append(
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.16 on 2018-12-22 09:31
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('file_metadata', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='filemetadataentry',
|
||||
name='key',
|
||||
field=models.CharField(db_index=True, help_text='Name of the file metadata entry.', max_length=255, verbose_name='Key'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='filemetadataentry',
|
||||
name='value',
|
||||
field=models.CharField(db_index=True, help_text='Value of the file metadata entry.', max_length=255, verbose_name='Value'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user