Repository: akvo/akvo-rsr

Issue:
Deprecation(django): Replace base_name by basename in urls.py
akvo/rest/urls.py uses `base_name` which is deprecated in future version of django.

```
/opt/project/akvo/rest/urls.py:85: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_iati_export', views.ProjectIatiExportViewSet,

/opt/project/akvo/rest/urls.py:87: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_extra', views.ProjectExtraViewSet,

/opt/project/akvo/rest/urls.py:89: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_extra_deep', views.ProjectExtraDeepViewSet,

/opt/project/akvo/rest/urls.py:91: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_up', views.ProjectUpViewSet,

/opt/project/akvo/rest/urls.py:101: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_update_extra', views.ProjectUpdateExtraViewSet,

/opt/project/akvo/rest/urls.py:103: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_update', views.ProjectUpdateViewSet,

/opt/project/akvo/rest/urls.py:118: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/reports', views.ReportViewSet, base_name='reports_api')
```
Deprecation(django): Replace base_name by basename in urls.py
akvo/rest/urls.py uses `base_name` which is deprecated in future version of django.

```
/opt/project/akvo/rest/urls.py:85: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_iati_export', views.ProjectIatiExportViewSet,

/opt/project/akvo/rest/urls.py:87: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_extra', views.ProjectExtraViewSet,

/opt/project/akvo/rest/urls.py:89: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_extra_deep', views.ProjectExtraDeepViewSet,

/opt/project/akvo/rest/urls.py:91: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_up', views.ProjectUpViewSet,

/opt/project/akvo/rest/urls.py:101: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_update_extra', views.ProjectUpdateExtraViewSet,

/opt/project/akvo/rest/urls.py:103: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/project_update', views.ProjectUpdateViewSet,

/opt/project/akvo/rest/urls.py:118: PendingDeprecationWarning: The `base_name` argument is pending deprecation in favor of `basename`.
  router.register(r'(?P<version>(v1))/reports', views.ReportViewSet, base_name='reports_api')
```


Discussion:

Resolving patch:
diff --git a/akvo/rest/urls.py b/akvo/rest/urls.py
--- a/akvo/rest/urls.py
+++ b/akvo/rest/urls.py
@@ -83,13 +83,13 @@
 router.register(r'(?P<version>(v1))/project', views.ProjectViewSet)
 router.register(r'(?P<version>(v1))/my_projects', views.MyProjectsViewSet)
 router.register(r'(?P<version>(v1))/project_iati_export', views.ProjectIatiExportViewSet,
-                base_name='project_iati_export')
+                basename='project_iati_export')
 router.register(r'(?P<version>(v1))/project_extra', views.ProjectExtraViewSet,
-                base_name='project_extra')
+                basename='project_extra')
 router.register(r'(?P<version>(v1))/project_extra_deep', views.ProjectExtraDeepViewSet,
-                base_name='project_extra_deep')
+                basename='project_extra_deep')
 router.register(r'(?P<version>(v1))/project_up', views.ProjectUpViewSet,
-                base_name='project_up')
+                basename='project_up')
 router.register(r'(?P<version>(v1))/project_condition', views.ProjectConditionViewSet)
 router.register(r'(?P<version>(v1))/project_contact', views.ProjectContactViewSet)
 router.register(r'(?P<version>(v1))/project_custom_field', views.ProjectCustomFieldViewSet)
@@ -99,9 +99,9 @@
 router.register(r'(?P<version>(v1))/project_map_location', views.MapProjectLocationViewSet)
 
 router.register(r'(?P<version>(v1))/project_update_extra', views.ProjectUpdateExtraViewSet,
-                base_name='project_update_extra')
+                basename='project_update_extra')
 router.register(r'(?P<version>(v1))/project_update', views.ProjectUpdateViewSet,
-                base_name='project_update')
+                basename='project_update')
 router.register(r'(?P<version>(v1))/project_update_location', views.ProjectUpdateLocationViewSet)
 router.register(r'(?P<version>(v1))/project_update_map_location', views.MapProjectUpdateLocationViewSet)
 
@@ -115,7 +115,7 @@
                 views.OrganisationRecipientOrgBudgetLineViewSet)
 router.register(r'(?P<version>(v1))/recipient_region', views.RecipientRegionViewSet)
 router.register(r'(?P<version>(v1))/related_project', views.RelatedProjectViewSet)
-router.register(r'(?P<version>(v1))/reports', views.ReportViewSet, base_name='reports_api')
+router.register(r'(?P<version>(v1))/reports', views.ReportViewSet, basename='reports_api')
 router.register(r'(?P<version>(v1|v2))/result', views.ResultsViewSet)
 router.register(r'(?P<version>(v1))/results_framework', views.ResultsFrameworkViewSet)
 router.register(r'(?P<version>(v1))/results_framework_lite', views.ResultsFrameworkLiteViewSet)


Test patch: