Skip to content

unt-libraries/django-edtf

Repository files navigation

Django-edtf

Build Status

About

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.

Requirements

Installation

  1. Download and install django-edtf.

    $ pip install git+git://github.com/unt-libraries/django-edtf.git
  2. Add app to INSTALLED_APPS.

    INSTALLED_APPS = (
        'edtf',
    )
  3. Include the URLs.

    urlpatterns = [
        path('edtf/', include('edtf.urls', namespace='edtf')),
    ]
  4. Add the MAINTENANCE_MSG var in the settings.

    MAINTENANCE_MSG = ''

License

See LICENSE

Contributors