Check content is actually accessible
Gunicorn's `--preload` only creates a single DB, which is good
This commit is contained in:
parent
670003c0f4
commit
861dedecf1
4 changed files with 9 additions and 2 deletions
|
@ -1,2 +1,3 @@
|
|||
django
|
||||
git+https://github.com/andrewgodwin/yamdl
|
||||
gunicorn
|
||||
|
|
6
yamdl_content/core/views.py
Normal file
6
yamdl_content/core/views.py
Normal 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()}")
|
|
@ -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',
|
||||
]
|
||||
|
||||
|
|
|
@ -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)
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue