From 219c82630a90352df90d228eda71d4610b40c22a Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 30 Jun 2017 17:48:07 -0400 Subject: [PATCH] Code cleanups. Signed-off-by: Roberto Rosario --- .../sources/migrations/0011_sanescanner.py | 16 +++++++-- .../migrations/0012_auto_20170205_0743.py | 12 +++++-- .../migrations/0013_auto_20170206_0710.py | 36 ++++++++++++++++--- .../migrations/0014_auto_20170206_0722.py | 19 ++++++++-- .../migrations/0015_auto_20170206_0835.py | 10 +++++- 5 files changed, 82 insertions(+), 11 deletions(-) diff --git a/mayan/apps/sources/migrations/0011_sanescanner.py b/mayan/apps/sources/migrations/0011_sanescanner.py index 892f519057..b6fc57e5db 100644 --- a/mayan/apps/sources/migrations/0011_sanescanner.py +++ b/mayan/apps/sources/migrations/0011_sanescanner.py @@ -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', diff --git a/mayan/apps/sources/migrations/0012_auto_20170205_0743.py b/mayan/apps/sources/migrations/0012_auto_20170205_0743.py index ec4c6b2468..bf4f066e3a 100644 --- a/mayan/apps/sources/migrations/0012_auto_20170205_0743.py +++ b/mayan/apps/sources/migrations/0012_auto_20170205_0743.py @@ -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' + ), ), ] diff --git a/mayan/apps/sources/migrations/0013_auto_20170206_0710.py b/mayan/apps/sources/migrations/0013_auto_20170206_0710.py index b435b64535..bed9fab82e 100644 --- a/mayan/apps/sources/migrations/0013_auto_20170206_0710.py +++ b/mayan/apps/sources/migrations/0013_auto_20170206_0710.py @@ -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' + ), ), ] diff --git a/mayan/apps/sources/migrations/0014_auto_20170206_0722.py b/mayan/apps/sources/migrations/0014_auto_20170206_0722.py index 46b3017b1e..9fb655901d 100644 --- a/mayan/apps/sources/migrations/0014_auto_20170206_0722.py +++ b/mayan/apps/sources/migrations/0014_auto_20170206_0722.py @@ -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' + ), ), ] diff --git a/mayan/apps/sources/migrations/0015_auto_20170206_0835.py b/mayan/apps/sources/migrations/0015_auto_20170206_0835.py index 8fe1339be6..375579641a 100644 --- a/mayan/apps/sources/migrations/0015_auto_20170206_0835.py +++ b/mayan/apps/sources/migrations/0015_auto_20170206_0835.py @@ -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' + ), ), ]