Closed nijiiffy closed 2 weeks ago
Thanks for reporting this and creating this detailed report!
The API class has been refactored and in fact split up. Apparently we missed this one occurrence here. i can't create a PR right, now but the fix should probably look like this here :
response_ = execute_from_django(itemtypes_api.get_collection_item, request, collection_id, item_id)
PR in #1686
excellent, thanks
Description I'm trying to integrate pyogcapi in a current django project, the docs are not so clear but i finally get it running. But when i try to get a item detail from a collections it thows an Exception:
AttributeError at /ogcapi/collections/lakes/items/0
Request Method: | GET -- | -- http://localhost:8000/ogcapi/collections/lakes/items/0 5.0.6 AttributeError 'API' object has no attribute 'get_collection_item' C:\Users\Niji\PycharmProjects\Maptail\pygeoapi\django\views.py, line 572, in _feed_response pygeoapi.django.views.collection_item C:\Users\Niji\PycharmProjects\Maptail\venv\Scripts\python.exe 3.11.9 ['C:\\Users\\Niji\\PycharmProjects\\Maptail', 'C:\\Users\\Niji\\PycharmProjects\\Maptail', 'C:\\Program Files\\JetBrains\\PyCharm ' '2023.3.3\\plugins\\python\\helpers\\pycharm_display', 'C:\\Python311\\python311.zip', 'C:\\Python311\\DLLs', 'C:\\Python311\\Lib', 'C:\\Python311', 'C:\\Users\\Niji\\PycharmProjects\\Maptail\\venv', 'C:\\Users\\Niji\\PycharmProjects\\Maptail\\venv\\Lib\\site-packages', 'C:\\Program Files\\JetBrains\\PyCharm ' '2023.3.3\\plugins\\python\\helpers\\pycharm_matplotlib_backend']Steps to Reproduce add pygeoapi master branch as a django app module, run all the stuff and try to explore de items in a collection
Expected behavior get the item details
Screenshots/Tracebacks![imagen](https://github.com/geopython/pygeoapi/assets/169949108/983adbfc-f733-4ab0-8eae-cba186761917)
Environment
Additional context looking at the last release (0.16.1) i see that get_collection_item is implemented as API method in api.py but i see now API lives in api/init.py but it misses a few methods, i notice that some belongs now to another files, but i'm not sure what happens with that get_collection_item