Amsterdam Datapunt code and style for Django REST Framework.
Django REST Framework extensions by Amsterdam Datapunt
Extensions to Django REST Framework by Amsterdam Datapunt. Amsterdam Datapunt provides access to municipal data through, at times, public APIs. This project provides some basic classes and instructions to set the behavior of Django REST Framework API to the standards of Amsterdam Datapunt.
Given that you have a Django project that generates a REST API using Django REST Framework:
pip install drf_amsterdam
To use the API page styling provided by this package you must add it to the Django settings file in INSTALLED_APPS, ahead of 'rest_framework' so that the templates and static files included in drf_amsterdam override those included with Django REST Framework.
Run the tests in a virtualenv and run the script runtests.py from project root.
requirements: spatialite, sqlite extension
or use docker-compose:
docker-compose build docker-compose run --rm tests pytest --cov
- Added types
- Tidied up code
- Added tests to reach 100% code coverage
HyperLinkedIdentityField. The reason for this is that
HyperLinkedIdentityFieldhas to return a
HyperLinkobject in order to comply with the rules of covariance, which is not what we desire it to return.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for drf_amsterdam-1.0.1-py3-none-any.whl