Conversation
| def ready(self): | ||
| register_serializer('sorted_json', 'cities_light.serializers.json') |
There was a problem hiding this comment.
Register an additional serializer where the dbdiff package was overriding the default json serializer.
| { | ||
| "fields": { | ||
| "alternate_names": "Юргинский район", | ||
| "country": [2017370], | ||
| "display_name": "Yurginskiy Rayon, Russia", | ||
| "geoname_code": "1485714", | ||
| "geoname_id": 1485714, | ||
| "name": "Yurginskiy Rayon", | ||
| "name_ascii": "Yurginskiy Rayon", | ||
| "region": [1503900], | ||
| "slug": "yurginskiy-rayon" | ||
| }, | ||
| "model": "cities_light.subregion", | ||
| "pk": 1 | ||
| }, |
There was a problem hiding this comment.
I noticed that this fixture wasn't up to date :/
|
Do you ser necessary continue with the Remove db-diff? Because know I have access to that repo and could keep updated |
|
@pfouque ? |
| "makemigrations", | ||
| "cities_light", | ||
| "--dry-run", | ||
| "--check", |
There was a problem hiding this comment.
Call the real makemigrations command instead of the MigrationLoader.
As it's kind of a public interface it should be more stable (it's also shorter and easier to test out of the tests)
There was a problem hiding this comment.
I like it, and some other modifications.
There was a problem hiding this comment.
Nice, I will try to move forward and get a stable state.
That would make this package more independent and easier to maintain
Up to you, I started this when it wasn't clear if db-diff would be fixed, and I discovered it was used mainly for a single assert. (If it was my project I would probably incorporate it directly, but up to you) |
Used only for testing, mainly using assertNoDiff only.
It creates some unnecessary back and forth between these 2 repository.
This PR tries to get rid of this dependency so that django-cities-light is more independent