2 ms·
A few years back, I implemented this as a Django CBV which worked quite well: https://github.com/LibraryOfCongress/concordia/blob/main/concordia/api_views.py h
by acdha 5y ago
A few years back, I implemented this as a Django CBV which worked quite well:
https://github.com/LibraryOfCongress/concordia/blob/main/concordia/api_views.py https://github.com/LibraryOfCongress/concordia/blob/main/con...
That handles a few things like pagination for list views, calling get_absolute_url() on objects in the template context which have that method defined, and running all URLs through request.build_absolute_uri().