Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push newly-added migrations; add migrations check in tox.ini #126

Closed
wants to merge 3 commits into from
Closed

Push newly-added migrations; add migrations check in tox.ini #126

wants to merge 3 commits into from

Conversation

niauah
Copy link

@niauah niauah commented Apr 26, 2021

Migrations based on newly added changes in v1.6.2 should be added into released pyPI package.
A test django-admin makemigrations --check is added to remind future developers about this.

@niauah niauah marked this pull request as ready for review April 26, 2021 03:49
@niauah
Copy link
Author

niauah commented Apr 26, 2021

The class FileExtensionValidator is not supported before django 1.11, see https://docs.djangoproject.com/en/3.1/releases/1.11/#validators

Tests with lower versions failed as:

  File "/home/travis/build/fabiocaccamo/django-admin-interface/admin_interface/migrations/0021_file_extension_validator.py", line 17, in Migration

    field=models.FileField(blank=True, help_text='(.ico|.png|.gif - 16x16|32x32 px)', upload_to='admin-interface/favicon/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['gif', 'ico', 'jpg', 'jpeg', 'png', 'svg'])], verbose_name='favicon'),

AttributeError: 'module' object has no attribute 'FileExtensionValidator'

@fabiocaccamo
Copy link
Owner

@niauah thank you for reporting this.
There is no need to change the CI, I just forgot to push the migration file.
You can upgrade to 0.16.3 version.

@merwok
Copy link
Contributor

merwok commented Apr 26, 2021

Why not add a migration check to CI? I have something similar in my project and it ensures this kind of mistakes can’t happen 🙁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants