1
Fork 0

Check content is actually accessible

Gunicorn's `--preload` only creates a single DB, which is good
This commit is contained in:
Jake Howard 2023-12-07 00:01:51 +00:00
parent 670003c0f4
commit 861dedecf1
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 9 additions and 2 deletions

View file

@ -1,2 +1,3 @@
django
git+https://github.com/andrewgodwin/yamdl
gunicorn

View file

@ -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()}")

View file

@ -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',
]

View file

@ -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)
]