Skip to content

Commit 0c2586b

Browse files
liquidpeleauvipy
authored andcommitted
Fix various things - WIP (#241)
* Django 1.11.17 is required to work with python 3.7+ so make sure to install that. * First pass at cleaning up the models some Adding proper verbose_name and help_text for all fields. Add validators to some as well. Verified that manage.py test still passes. This is a WIP though, it will need a migration before we're done. * Fix flake8 errors * Fix pydocstyle errors * Add migration, fix migration history, add tests around migrations. Migrations were broken if you went backward and forward again, so I fixed the history with a new migration. I then was able to properly add my own new migration. Lastly, I added tests to try and ensure no migration issues happened again. * Make raw sql a tuple format to avoid sqlparse requirement * Must add absolute_import to every file for python2 * Don't have to clear our django's migration history, apparently it works fine without that. * sqlite won't let you run things like migrations inside another transaction (like a test) * Fix django 2.2 tests * Setting TOXENV seems to no longer handle the django env variable, so just let it do one test with latest django. * Run migration backward/forward for all tests
1 parent a994d5a commit 0c2586b

15 files changed

+414
-260
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ os:
1313
- linux
1414
matrix:
1515
include:
16-
- {python: 3.7, env: DJANGO=1.11 TOXENV=python37, dist: xenial, sudo: true}
17-
- {python: 3.7, env: DJANGO=2.0 TOXENV=python37, dist: xenial, sudo: true}
18-
- {python: 3.7, env: DJANGO=2.2 TOXENV=python37, dist: xenial, sudo: true}
16+
- {python: 3.7, env: TOXENV=python37, dist: xenial, sudo: true}
1917
- { python: 3.5, env: TOXENV=flake8 }
2018
- { python: 2.7, env: TOXENV=flakeplus }
2119
- { python: 3.5, env: TOXENV=pydocstyle }

django_celery_beat/migrations/0005_add_solarschedule_events_choices.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

django_celery_beat/migrations/0005_add_solarschedule_events_choices_squashed_0009_merge_20181012_1416.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77

88

99
class Migration(migrations.Migration):
10-
replaces = [
11-
('django_celery_beat', '0005_add_solarschedule_events_choices'),
12-
('django_celery_beat', '0006_auto_20180210_1226'),
13-
('django_celery_beat', '0006_auto_20180322_0932'),
14-
('django_celery_beat', '0007_auto_20180521_0826'),
15-
('django_celery_beat', '0008_auto_20180914_1922'),
16-
]
17-
1810
dependencies = [
1911
('django_celery_beat', '0004_auto_20170221_0000'),
2012
]

django_celery_beat/migrations/0006_auto_20180210_1226.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

django_celery_beat/migrations/0006_auto_20180322_0932.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

django_celery_beat/migrations/0007_auto_20180521_0826.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

django_celery_beat/migrations/0008_auto_20180914_1922.py

Lines changed: 0 additions & 60 deletions
This file was deleted.

django_celery_beat/migrations/0009_periodictask_headers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class Migration(migrations.Migration):
88

99
dependencies = [
1010
('django_celery_beat', '0006_periodictask_priority'),
11-
('django_celery_beat', '0008_auto_20180914_1922'),
1211
]
1312

1413
operations = [

0 commit comments

Comments
 (0)