Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to django-neomodel 0.2.0 #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 7 additions & 6 deletions docs/tutorial/part03.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,24 @@ 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 = []

As we go on in this tutorial, we will start adding the endpoint urls, but for now we only need to
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')), ]


Expand Down
18 changes: 9 additions & 9 deletions docs/tutorial/part05.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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'),
]
14 changes: 7 additions & 7 deletions paradise_papers_search/fetch_api/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.conf.urls import url
from django.urls import path

from .views import (
GetNodesCount,
Expand All @@ -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"),
]
Binary file modified paradise_papers_search/papers.db
Binary file not shown.
15 changes: 8 additions & 7 deletions paradise_papers_search/paradise_papers_search/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf.urls import url, include

from django.urls import include, path
from django.views.generic import TemplateView
from django.contrib import admin

urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'),
url(r'^fetch/', include('fetch_api.urls')),
url(r"^admin/", admin.site.urls)
path("", TemplateView.as_view(template_name="index.html"), name="index"),
path("fetch/", include("fetch_api.urls")),
path("admin/", admin.site.urls),
]
2 changes: 1 addition & 1 deletion paradise_papers_search/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
<!doctype html>
<html lang="en">
<head>
Expand Down
6 changes: 2 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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