Add test iframe

This commit is contained in:
KenwoodFox
2025-12-03 13:00:25 -05:00
parent 20b5086800
commit 28336aa268
4 changed files with 256 additions and 4 deletions

View File

@@ -1,16 +1,19 @@
"""
URL configuration for seduttomotorsports project.
"""
from django.urls import path
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('', views.quote_upload, name='quote_upload'),
path("", views.quote_upload, name="quote_upload"),
]
if settings.DEBUG:
urlpatterns += [
path("test-iframe/", views.test_iframe, name="test_iframe"),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

View File

@@ -1,5 +1,7 @@
from django.shortcuts import render
from django.views.decorators.clickjacking import xframe_options_exempt
from django.http import Http404
from django.conf import settings
@xframe_options_exempt
@@ -8,4 +10,10 @@ def quote_upload(request):
Simple embeddable quote upload box.
TODO: Implement file upload and email integration
"""
return render(request, 'quote_upload.html')
return render(request, "quote_upload.html")
def test_iframe(request):
if not settings.DEBUG:
raise Http404("Not available in production")
return render(request, "test_iframe.html")