Skip to content

Commit

Permalink
Start adding foundations for subscriptions
Browse files Browse the repository at this point in the history
Signed-off-by: Tormod Haugland <tormod.haugland@gmail.com>
  • Loading branch information
tOgg1 committed Sep 16, 2024
1 parent 756cc1d commit d8f6a7c
Show file tree
Hide file tree
Showing 7 changed files with 431 additions and 262 deletions.
6 changes: 3 additions & 3 deletions graphene_django_cud/wsgi.py → graphene_django_cud/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import os

from django.core.wsgi import get_wsgi_application
from django_ws import get_websocket_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "graphene_django_cud.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_settings")

application = get_wsgi_application()
application = get_websocket_application()
Empty file.
5 changes: 4 additions & 1 deletion graphene_django_cud/tests/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import luna_ws
from django.urls import re_path
from graphene_file_upload.django import FileUploadGraphQLView

urlpatterns = [re_path(r"^graphql", FileUploadGraphQLView.as_view(graphiql=True))]
urlpatterns = [
re_path(r"^graphql", FileUploadGraphQLView.as_view(graphiql=True)),
]
8 changes: 6 additions & 2 deletions graphene_django_cud/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
import luna_ws
from django.contrib import admin
from django.urls import path
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import path, re_path
from graphene_file_upload.django import FileUploadGraphQLView

urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", FileUploadGraphQLView(graphiql=True).as_view()),
path("graphql", FileUploadGraphQLView.as_view(graphiql=True)),
]

urlpatterns += staticfiles_urlpatterns()
664 changes: 411 additions & 253 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ authors = ["Tormod Haugland <tormod.haugland@gmail.com>"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.10"
graphene-django = "^3.0"
graphene-file-upload = "^1.2"
graphene-luna = "^1.0.0"
gunicorn = "^23.0.0"

[tool.poetry.dev-dependencies]
django = "^3.2"
django = "^5.1.1"
pytest = "^7.4"
pytest-django = "^4.0"
factory_boy = "^3.2"
Expand All @@ -20,6 +22,8 @@ pytest-cov = "^4.1"

[tool.poetry.group.dev.dependencies]
sphinx-rtd-theme = "^2.0.0"
uvicorn = "^0.30.6"
gunicorn = "^23.0.0"

[tool.black]
line-length = 120
Expand Down
2 changes: 1 addition & 1 deletion test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@

STATIC_URL = "/static/"
STATIC_ROOT = "static/"
ROOT_URLCONF = "graphene_django_cud.tests.urls"
ROOT_URLCONF = "graphene_django_cud.urls"

0 comments on commit d8f6a7c

Please sign in to comment.