From 585aa80c4f2ba3584936fc3c3f8e83dae7a29678 Mon Sep 17 00:00:00 2001 From: Marius Conjeaud Date: Wed, 22 May 2024 15:23:45 +0200 Subject: [PATCH] Bump to django-neomodel 0.2.0 --- README.md | 8 ++++---- docs/tutorial/part03.rst | 13 +++++++------ docs/tutorial/part05.rst | 18 +++++++++--------- paradise_papers_search/fetch_api/urls.py | 14 +++++++------- paradise_papers_search/papers.db | Bin 131072 -> 139264 bytes .../paradise_papers_search/urls.py | 15 ++++++++------- paradise_papers_search/templates/base.html | 2 +- requirements.txt | 6 ++---- 8 files changed, 38 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index cd25412..0e1d30d 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ A simple Django web app for searching the Paradise Papers dataset backed by Neo4 # Requirements -- Python 3.7+ -- Django 2.2+ -- neo4j 5.x, 4.4 -- django-neomodel 0.1.1 +- Python 3.8+ +- Django 4.2.8+ (LTS) +- neo4j 5.x, 4.4 (LTS) +- django-neomodel 0.2.0 # Quickstart diff --git a/docs/tutorial/part03.rst b/docs/tutorial/part03.rst index d1138ca..cf8fd8d 100644 --- a/docs/tutorial/part03.rst +++ b/docs/tutorial/part03.rst @@ -25,7 +25,7 @@ of it is: :: Now we need to create a file called `urls.py` inside the application we just created. Right now we are only going to add the following code:: - from django.conf.urls import url + from django.urls import path urlpatterns = [] @@ -33,15 +33,16 @@ As we go on in this tutorial, we will start adding the endpoint urls, but for no have the empty urlpattern list. The next step is to register the fetch_api URLconf into the root project URLconf. We need to open -the file paradise_papers_search/urls.py. Afterwards, we have to add ``url(r'^fetch/', +the file paradise_papers_search/urls.py. Afterwards, we have to add ``path('fetch/', include('fetch_api.urls', namespace='fetch_api')),`` inside the urlpatterns list. After completing these steps the file should look like this:: - from django.conf.urls import url, include from django.contrib import admin from - django.views.generic import TemplateView + from django.urls import include, path + from django.contrib import admin + from django.views.generic import TemplateView - urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', - TemplateView.as_view(template_name='index.html'), name='index'), url(r'^fetch/', + urlpatterns = [ path('admin/', admin.site.urls), path('', + TemplateView.as_view(template_name='index.html'), name='index'), path('fetch/', include('fetch_api.urls', namespace='fetch_api')), ] diff --git a/docs/tutorial/part05.rst b/docs/tutorial/part05.rst index cd2630b..7e37d58 100644 --- a/docs/tutorial/part05.rst +++ b/docs/tutorial/part05.rst @@ -47,11 +47,11 @@ Let's clean our ``fetch_api/views.py`` file and add the following code:: Now we create this file ``fetch_api/urls.py`` and fill it with this:: - from django.conf.urls import url + from django.urls import path from .views import GetNodesData urlpatterns = [ - url(r'^nodes[/]?$', GetNodesData.as_view(), name='get_nodes_data'), + path('nodes/', GetNodesData.as_view(), name='get_nodes_data'), ] Now we can hit the endpoint with a method of our preference, for this example, we are going to use @@ -107,7 +107,7 @@ When we finish our ``fetch_api/views.py`` file should look like this:: And the ``fetch_api/urls.py`` should look like this:: - from django.conf.urls import url + from django.urls import path from .views import ( GetNodesCount, GetNodesData, @@ -118,10 +118,10 @@ And the ``fetch_api/urls.py`` should look like this:: ) urlpatterns = [ - url(r'^count[/]?$', GetNodesCount.as_view(), name='get_nodes_count'), - url(r'^nodes[/]?$', GetNodesData.as_view(), name='get_nodes_data'), - url(r'^node[/]?$', GetNodeData.as_view(), name='get_node_data'), - url(r'^countries[/]?$', GetCountries.as_view(), name='get_countries'), - url(r'^jurisdictions[/]?$', GetJurisdictions.as_view(), name='get_jurisdictions'), - url(r'^datasource[/]?$', GetDataSource.as_view(), name='get_data_source'), + path('count/', GetNodesCount.as_view(), name='get_nodes_count'), + path('nodes/', GetNodesData.as_view(), name='get_nodes_data'), + path('node/', GetNodeData.as_view(), name='get_node_data'), + path('countries/', GetCountries.as_view(), name='get_countries'), + path('jurisdictions/', GetJurisdictions.as_view(), name='get_jurisdictions'), + path('datasource/', GetDataSource.as_view(), name='get_data_source'), ] diff --git a/paradise_papers_search/fetch_api/urls.py b/paradise_papers_search/fetch_api/urls.py index 1b3070f..58fc159 100644 --- a/paradise_papers_search/fetch_api/urls.py +++ b/paradise_papers_search/fetch_api/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url +from django.urls import path from .views import ( GetNodesCount, @@ -11,10 +11,10 @@ urlpatterns = [ - url(r'^count[/]?$', GetNodesCount.as_view(), name='get_nodes_count'), - url(r'^nodes[/]?$', GetNodesData.as_view(), name='get_nodes_data'), - url(r'^node[/]?$', GetNodeData.as_view(), name='get_node_data'), - url(r'^countries[/]?$', GetCountries.as_view(), name='get_countries'), - url(r'^jurisdictions[/]?$', GetJurisdictions.as_view(), name='get_jurisdictions'), - url(r'^datasource[/]?$', GetDataSource.as_view(), name='get_data_source'), + path("count/", GetNodesCount.as_view(), name="get_nodes_count"), + path("nodes/", GetNodesData.as_view(), name="get_nodes_data"), + path("node/", GetNodeData.as_view(), name="get_node_data"), + path("countries/", GetCountries.as_view(), name="get_countries"), + path("jurisdictions/", GetJurisdictions.as_view(), name="get_jurisdictions"), + path("datasource/", GetDataSource.as_view(), name="get_data_source"), ] diff --git a/paradise_papers_search/papers.db b/paradise_papers_search/papers.db index 9afda682d777a28e19ab815cec4b7ac5a2686cd8..7b2ff98f743c7af7b4663015d7cfb74b85857c8b 100644 GIT binary patch delta 647 zcmZo@;Al9&F+o~Tg@J)V35dCYmKYj-7#dp{7+aYd>RFhYnp;|Ko+Vw*!rINhhCgYuqJj^<2>&bw5yrgK z^7wd=>0mRNCYR}(GxAMdrys~Dw8?-afrCMSfq_4aZ!S>FM83^)=Or`p09^?Jj6lq_ zS+L;>|K{pPb6{M^ zxczw+<9Viy7j>AnA972nA|0GGykl zSxyg5X0&GGdd^_vDi1V5RtOvs%_f%Y;+mR_ZOYABmXm+5%P}fW7UUA1ti@3{Jw1id zce+n1qr&tnDU21!W6>|kYKU|@N+{dE>&B(r_9CDZ_2u#ZvQfyz^K4svx2 waa9O$bnh$?Nn383i{Puq13{VfrJ#X#>jyB`%h!4E!p5mpHGo z9pWwL>0%RM4QH9k{T&9G{%%)uU|h&J{hli$`{r|u$C)->&}G_w$c@pIk%{ra=AZ1k z%q&2=FHY9tKF-Ana$ZxTfH3=XM+e3U+q-=jD}}X$8Pyp0v-k>lxAMH;dd_9Txsu~9 zhY;HA}g2)=Y-R z)6eHK8gO$rYZ|eO%gZyiDNg>+K4<#RJVxKiuQ`+_8*uVZugGT%ooEIri diff --git a/requirements.txt b/requirements.txt index 2c631f0..f43726b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,4 @@ -django==2.2.24 gunicorn==20.0.4 -django-neomodel==0.1.1 -neomodel==5.1.0 -djangorestframework==3.11.2 +django-neomodel==0.2.0 +djangorestframework==3.15.1 whitenoise==3.3.1