Closed DrMattChristian closed 7 years ago
@DrMattChristian Thanks! If you rebase your patch against the current master, bumping the version to 0.7.4 (or removing that change altogether), I will happily merge it.
@tuffnatty Yes I just rebased my PR onto your latest upstream master. I eliminated the version change entirely, now just one file change. You can bump/tag the main version as you see fit.
Thanks in advance for merging my simple change into upstream so I don't have to carry it separately.
I'm open to better handling of the
xs:gYearMonth
XSD data type since it doesn't cleanly map into a Django DateField.xsd:gYearMonth Datatype Reference
Without this minor code change, the Python interpreter crashes due to an assert.
xsd_to_django_model.py:586: assert type(options) is dict, "options is not a dict"
Example XSD input fragment to reproduce:
I created a simple class-based
YearMonthDateField
that subclassesDateField
. I can provide that Python code if it would help. In my custom field, the day is always overridden to 1 and ignored. The string output format isYYYY-MM
(no day). The rest of the normal DateField validation is left intact.More minor changes: