Django-edtf is an app which provides the service of validating dates that comply with the
Extended Date Time Format (Levels 0-2).
The simple interface may be used from the browser or from the command-line, using a utility
such as curl
. You can check if the date value is a feature of a level using levelFeature
optional parameter and
check if the date conforms at the given level using levelConforms
optional parameter.
The response returned will usually be an HTTP 200 with a JSON object containing { "validEDTF": true }
or { "validEDTF": false }
. In some circumstances (no date value
entered or an invalid level value) you may receive an HTTP 400 to indicate that something is invalid.
- Django 4.2
- Python 3.8-3.10
- edtf-validate >= 1.1.0
-
Download and install django-edtf.
$ pip install git+git://github.com/unt-libraries/django-edtf.git
-
Add app to INSTALLED_APPS.
INSTALLED_APPS = ( 'edtf', )
-
Include the URLs.
urlpatterns = [ path('edtf/', include('edtf.urls', namespace='edtf')), ]
-
Add the MAINTENANCE_MSG var in the settings.
MAINTENANCE_MSG = ''
See LICENSE