Code cleanups.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-06-30 17:48:07 -04:00
parent 3cb52c96be
commit 219c82630a
5 changed files with 82 additions and 11 deletions

View File

@@ -16,8 +16,20 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='SaneScanner',
fields=[
('interactivesource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='sources.InteractiveSource')),
('device_name', models.CharField(help_text='Device name as returned by the SANE backend.', max_length=255, verbose_name='Device name')),
(
'interactivesource_ptr', models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True, primary_key=True, serialize=False,
to='sources.InteractiveSource'
)
),
(
'device_name', models.CharField(
help_text='Device name as returned by the SANE backend.',
max_length=255, verbose_name='Device name'
)
),
],
options={
'verbose_name': 'SANE Scanner',

View File

@@ -15,11 +15,19 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='sanescanner',
name='mode',
field=models.CharField(choices=[('lineart', 'Lineart'), ('monochrome', 'Monochrome'), ('color', 'Color')], default='color', max_length=16, verbose_name='Mode'),
field=models.CharField(
choices=[
('lineart', 'Lineart'), ('monochrome', 'Monochrome'),
('color', 'Color')
], default='color', max_length=16, verbose_name='Mode'
),
),
migrations.AddField(
model_name='sanescanner',
name='resolution',
field=models.PositiveIntegerField(default=300, help_text='Sets the resolution of the scanned image in DPI (dots per inch).', verbose_name='Resolution'),
field=models.PositiveIntegerField(
default=300, help_text='Sets the resolution of the scanned image in DPI (dots per inch).',
verbose_name='Resolution'
),
),
]

View File

@@ -15,21 +15,49 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='sanescanner',
name='adf_mode',
field=models.CharField(blank=True, choices=[('simplex', 'Simples'), ('duplex', 'Duplex')], default='simplex', help_text='Selects the document feeder mode (simplex/duplex). If this option is not supported by your scanner, leave it blank.', max_length=16, verbose_name='ADF mode'),
field=models.CharField(
blank=True, choices=[
('simplex', 'Simples'), ('duplex', 'Duplex')
], default='simplex',
help_text='Selects the document feeder mode (simplex/duplex). '
'If this option is not supported by your scanner, leave it '
'blank.', max_length=16, verbose_name='ADF mode'
),
),
migrations.AddField(
model_name='sanescanner',
name='source',
field=models.CharField(blank=True, choices=[('flatbed', 'Flatbed'), ('document-feeder', 'Document feeder')], default='flatbed', help_text='Selects the scan source (such as a document-feeder). If this option is not supported by your scanner, leave it blank.', max_length=16, verbose_name='Paper source'),
field=models.CharField(
blank=True, choices=[
('flatbed', 'Flatbed'),
('document-feeder', 'Document feeder')
], default='flatbed', help_text='Selects the scan source '
'(such as a document-feeder). If this option is not supported '
'by your scanner, leave it blank.', max_length=16,
verbose_name='Paper source'
),
),
migrations.AlterField(
model_name='sanescanner',
name='mode',
field=models.CharField(blank=True, choices=[('lineart', 'Lineart'), ('monochrome', 'Monochrome'), ('color', 'Color')], default='color', help_text='Selects the scan mode (e.g., lineart, monochrome, or color). If this option is not supported by your scanner, leave it blank.', max_length=16, verbose_name='Mode'),
field=models.CharField(
blank=True, choices=[
('lineart', 'Lineart'), ('monochrome', 'Monochrome'),
('color', 'Color')
], default='color', help_text='Selects the scan mode '
'(e.g., lineart, monochrome, or color). If this option is '
'not supported by your scanner, leave it blank.',
max_length=16, verbose_name='Mode'
),
),
migrations.AlterField(
model_name='sanescanner',
name='resolution',
field=models.PositiveIntegerField(blank=True, help_text='Sets the resolution of the scanned image in DPI (dots per inch). Typical value is 200. If this option is not supported by your scanner, leave it blank.', verbose_name='Resolution'),
field=models.PositiveIntegerField(
blank=True, help_text='Sets the resolution of the scanned '
'image in DPI (dots per inch). Typical value is 200. If '
'this option is not supported by your scanner, leave it '
'blank.', verbose_name='Resolution'
),
),
]

View File

@@ -15,11 +15,26 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='sanescanner',
name='adf_mode',
field=models.CharField(blank=True, choices=[('simplex', 'Simplex'), ('duplex', 'Duplex')], default='simplex', help_text='Selects the document feeder mode (simplex/duplex). If this option is not supported by your scanner, leave it blank.', max_length=16, verbose_name='ADF mode'),
field=models.CharField(
blank=True, choices=[
('simplex', 'Simplex'), ('duplex', 'Duplex')
], default='simplex', help_text='Selects the document feeder '
'mode (simplex/duplex). If this option is not supported by '
'your scanner, leave it blank.', max_length=16,
verbose_name='ADF mode'
),
),
migrations.AlterField(
model_name='sanescanner',
name='source',
field=models.CharField(blank=True, choices=[('flatbed', 'Flatbed'), ('"Automatic Document Feeder"', 'Document feeder')], default='flatbed', help_text='Selects the scan source (such as a document-feeder). If this option is not supported by your scanner, leave it blank.', max_length=32, verbose_name='Paper source'),
field=models.CharField(
blank=True, choices=[
('flatbed', 'Flatbed'),
('"Automatic Document Feeder"', 'Document feeder')
], default='flatbed', help_text='Selects the scan source '
'(such as a document-feeder). If this option is not '
'supported by your scanner, leave it blank.', max_length=32,
verbose_name='Paper source'
),
),
]

View File

@@ -15,6 +15,14 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='sanescanner',
name='source',
field=models.CharField(blank=True, choices=[('flatbed', 'Flatbed'), ('Automatic Document Feeder', 'Document feeder')], default='flatbed', help_text='Selects the scan source (such as a document-feeder). If this option is not supported by your scanner, leave it blank.', max_length=32, verbose_name='Paper source'),
field=models.CharField(
blank=True, choices=[
('flatbed', 'Flatbed'),
('Automatic Document Feeder', 'Document feeder')
], default='flatbed', help_text='Selects the scan source '
'(such as a document-feeder). If this option is not '
'supported by your scanner, leave it blank.', max_length=32,
verbose_name='Paper source'
),
),
]