Code cleanups

PEP8 cleanups. Add keyword arguments.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-21 00:56:22 -04:00
parent fbe0e14b82
commit 4baeb6ce7e
219 changed files with 1891 additions and 507 deletions

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View File

@@ -1,12 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.template.defaultfilters import slugify
def assign_slugs(apps, schema_editor):
Index = apps.get_model('document_indexing', 'Index')
def operation_assign_slugs(apps, schema_editor):
Index = apps.get_model(app_label='document_indexing', model_name='Index')
for index in Index.objects.using(schema_editor.connection.alias).all():
index.slug = slugify(index.label)
@@ -20,5 +19,5 @@ class Migration(migrations.Migration):
]
operations = [
migrations.RunPython(assign_slugs),
migrations.RunPython(code=operation_assign_slugs),
]

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-05-24 04:56
from __future__ import unicode_literals
from django.db import migrations, models

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-30 07:28
from __future__ import unicode_literals
from django.db import migrations, models
@@ -16,16 +14,27 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='index',
name='slug',
field=models.SlugField(help_text='This value will be used by other apps to reference this index.', max_length=128, unique=True, verbose_name='Slug'),
field=models.SlugField(
help_text='This value will be used by other apps to reference '
'this index.', max_length=128, unique=True, verbose_name='Slug'
),
),
migrations.AlterField(
model_name='indexinstancenode',
name='documents',
field=models.ManyToManyField(related_name='index_instance_nodes', to='documents.Document', verbose_name='Documents'),
field=models.ManyToManyField(
related_name='index_instance_nodes', to='documents.Document',
verbose_name='Documents'
),
),
migrations.AlterField(
model_name='indexinstancenode',
name='index_template_node',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='index_instance_nodes', to='document_indexing.IndexTemplateNode', verbose_name='Index template node'),
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name='index_instance_nodes',
to='document_indexing.IndexTemplateNode',
verbose_name='Index template node'
),
),
]

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-07-14 21:33
from __future__ import unicode_literals
from django.db import migrations
@@ -14,6 +12,9 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterModelOptions(
name='index',
options={'ordering': ('label',), 'verbose_name': 'Index', 'verbose_name_plural': 'Indexes'},
options={
'ordering': ('label',), 'verbose_name': 'Index',
'verbose_name_plural': 'Indexes'
},
),
]

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-08-23 23:53
from __future__ import unicode_literals
from django.db import migrations, models
@@ -15,6 +13,11 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='indextemplatenode',
name='expression',
field=models.TextField(help_text="Enter a template to render. Use Django's default templating language (https://docs.djangoproject.com/en/1.11/ref/templates/builtins/)", verbose_name='Indexing expression'),
field=models.TextField(
help_text="Enter a template to render. Use Django's default "
"templating language "
"(https://docs.djangoproject.com/en/1.11/ref/templates/builtins/)",
verbose_name='Indexing expression'
),
),
]

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-04-29 19:22
from __future__ import unicode_literals
from django.db import migrations, models
@@ -15,6 +13,9 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='index',
name='document_types',
field=models.ManyToManyField(related_name='indexes', to='documents.DocumentType', verbose_name='Document types'),
field=models.ManyToManyField(
related_name='indexes', to='documents.DocumentType',
verbose_name='Document types'
),
),
]