diff --git a/requirements.txt b/requirements.txt index f1d0673..d5939a9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ django git+https://github.com/andrewgodwin/yamdl +gunicorn diff --git a/yamdl_content/core/views.py b/yamdl_content/core/views.py new file mode 100644 index 0000000..39bcfbc --- /dev/null +++ b/yamdl_content/core/views.py @@ -0,0 +1,6 @@ +from .models import Page +from django.http import HttpResponse +import os + +def test(request): + return HttpResponse(f"{Page.objects.count()} {os.getpid()}") diff --git a/yamdl_content/settings.py b/yamdl_content/settings.py index 8dad8f9..cfd53df 100644 --- a/yamdl_content/settings.py +++ b/yamdl_content/settings.py @@ -31,7 +31,6 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ - 'django.contrib.messages', 'django.contrib.staticfiles', "yamdl", "yamdl_content.core" @@ -41,7 +40,6 @@ MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] diff --git a/yamdl_content/urls.py b/yamdl_content/urls.py index a1e4c73..dad3a62 100644 --- a/yamdl_content/urls.py +++ b/yamdl_content/urls.py @@ -15,6 +15,8 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.urls import path +from .core import views urlpatterns = [ + path("test/", views.test) ]