deschler / django-modeltranslation

Translates Django models using a registration approach.
BSD 3-Clause "New" or "Revised" License
1.34k stars 257 forks source link

Add missing migrations for tests app/models #699

Closed sergei-maertens closed 10 months ago

sergei-maertens commented 10 months ago

Simply checking out master and running makemigrations produces these missing migrations. Run on the lowest supported versions of Python and Django (3.8 and 3.2 respectively).

Separate PR for this to not distract from the main PR, for which a new model field is added to be able to test the behaviour for #698.

last-partizan commented 10 months ago

@sergei-maertens i think, for the test app it's better to just remove initial migration and recreate it.

And don't forget to run black modeltranslation *.py on your changes.

sergei-maertens commented 10 months ago

@sergei-maertens i think, for the test app it's better to just remove initial migration and recreate it.

And don't forget to run black modeltranslation *.py on your changes.

Sure, works for me! I'll update the PR

w/r to black - is it only applied on the app itself? I noticed that the tests themselves do not have consistent code formatting, that's why I didn't run it in the first place as it was unclear that black is used. The contributor docs only make mention of flake8.

sergei-maertens commented 10 months ago

Rebased and updated with re-generated initial migration.

last-partizan commented 10 months ago

w/r to black - is it only applied on the app itself? I noticed that the tests themselves do not have consistent code formatting

It is applied, but for whatever reason we have skip-string-normalization = true in pyproject.toml. I'll fix it after we merge your changes.