From 28bfa8c631032ac12502caa14ea97d3a9a5d7730 Mon Sep 17 00:00:00 2001 From: Ryan Westfall Date: Mon, 26 Jan 2026 04:18:46 -0600 Subject: [PATCH] adding proxy code --- proxy/__init__.py | 0 proxy/admin.py | 3 +++ proxy/apps.py | 5 +++++ proxy/migrations/__init__.py | 0 proxy/models.py | 3 +++ proxy/templates/proxy/info.html | 20 ++++++++++++++++++++ proxy/tests.py | 3 +++ proxy/urls.py | 8 ++++++++ proxy/views.py | 11 +++++++++++ 9 files changed, 53 insertions(+) create mode 100644 proxy/__init__.py create mode 100644 proxy/admin.py create mode 100644 proxy/apps.py create mode 100644 proxy/migrations/__init__.py create mode 100644 proxy/models.py create mode 100644 proxy/templates/proxy/info.html create mode 100644 proxy/tests.py create mode 100644 proxy/urls.py create mode 100644 proxy/views.py diff --git a/proxy/__init__.py b/proxy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/proxy/admin.py b/proxy/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/proxy/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/proxy/apps.py b/proxy/apps.py new file mode 100644 index 0000000..c677400 --- /dev/null +++ b/proxy/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ProxyConfig(AppConfig): + name = "proxy" diff --git a/proxy/migrations/__init__.py b/proxy/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/proxy/models.py b/proxy/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/proxy/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/proxy/templates/proxy/info.html b/proxy/templates/proxy/info.html new file mode 100644 index 0000000..85c8333 --- /dev/null +++ b/proxy/templates/proxy/info.html @@ -0,0 +1,20 @@ +{% extends "base/layout.html" %} + +{% block title %}Proxy Service - TCGKof{% endblock %} + +{% block content %} +
+

Proxy Card Service

+

We offer high-quality proxy cards for playtesting purposes.

+

This service allows you to test out decks before committing to buying the real cards.

+ +
+

How it works

+
    +
  1. Browse our catalog or upload your deck list
  2. +
  3. Select the cards you want to proxy
  4. +
  5. Checkout and receive your cards
  6. +
+
+
+{% endblock %} diff --git a/proxy/tests.py b/proxy/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/proxy/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/proxy/urls.py b/proxy/urls.py new file mode 100644 index 0000000..1293c93 --- /dev/null +++ b/proxy/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from . import views + +app_name = 'proxy' + +urlpatterns = [ + path('info/', views.proxy_info, name='info'), +] diff --git a/proxy/views.py b/proxy/views.py new file mode 100644 index 0000000..3e78667 --- /dev/null +++ b/proxy/views.py @@ -0,0 +1,11 @@ +from django.shortcuts import render +from django.conf import settings +from django.http import Http404 + +def proxy_info(request): + if not getattr(settings, 'FEATURE_PLAYTEST_PROXY', False): + raise Http404("Proxy service is not available") + + return render(request, 'proxy/info.html', { + 'title': 'Proxy Service' + })