django-birthday
django-birthday copied to clipboard
Methods don't work due to the internal field non-updated.
When you already have a model with a DateField for birthdays and you change that field for BirthdayField field you don't have the %s_dayofyear_internal field updated due to this field is updated with a pre_save signal. So, you can not use the provided methods.
You have to use something like [c.save() for c in Client.objects.all()] to update all your Client objects getting the presignal executed for each object.
It's a good idea you to document this problem in your docs.
Do you know a better way to update that field instead of use that loop?
to @maoaiz what do you think about adding post_migrate handler, that will find all models using BirthdayField and auto-update them?
@bashu that is a good idea; this should be transparent to the developer.