Hope you are well.
I found that very interesting tutorial about map with a very nice documentation, if you want to have map ( GeoDjango, PostGIS, Leaflet). As I used Leaflet I continue with it.
However, I have some doubts as I have to search how to adapt it.
If you go to that tutorial and you look for the string “Adding the Marker viewset”, he/she created a file named
But whats the difference with the file views.py?
Should i create a file viewsets.py or should I copy the code to my file views.py?
If you continue reading below, he created a file
api.py at the root of the application.
Does it will work, if copy the file as the following (in the case I use views.py instead of viewsets.py)
"""Markers API URL Configuration.""" from rest_framework import routers from markers.views import MarkerView router = routers.DefaultRouter() router.register(r"markers", MarkerView) urlpatterns = router.urls
and then in the urls.py
I have not tried anythings yet, because I am confused with the naming
views have is own roles?
Is due to a version of Django?
Many thanks for your clarification