-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
How to reproduce:
Make sure you have enabled the custom module in your Python virtual environment:
pip install django-partial-date==1.3.2 django-reversion==5.0.4
Create the following class in the django models.py:
from partial_date import PartialDateField
class Station(models.Model):
name = models.CharField(max_length=200)
created = PartialDateField(blank=True, null=True)
Register the administration of the object with reversion in admin.py:
from reversion.admin import VersionAdmin
@admin.register(Station)
class StationAdmin(VersionAdmin):
pass
run migrations on your commandline:
python manage.py makemigrations
python manage.py migrate
- Login in the admin interface and create a Station object. Provide only a value for the "name" field and leave all the rest empty. Click save and continue editing.
- Provide a partial date value in the "Created" the field. E.g. "2020-05". Click save and continue editing
- Click on history.
- Click on the older version you created before: unintended behavior: "Could not load Name version - incompatible version data."
- Click on the latest version with the partial date specified: intended behavior. The version loads properly
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels