adding proxy code

This commit is contained in:
2026-01-26 04:18:46 -06:00
parent 739d136209
commit 28bfa8c631
9 changed files with 53 additions and 0 deletions

0
proxy/__init__.py Normal file
View File

3
proxy/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

5
proxy/apps.py Normal file
View File

@@ -0,0 +1,5 @@
from django.apps import AppConfig
class ProxyConfig(AppConfig):
name = "proxy"

View File

3
proxy/models.py Normal file
View File

@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View File

@@ -0,0 +1,20 @@
{% extends "base/layout.html" %}
{% block title %}Proxy Service - TCGKof{% endblock %}
{% block content %}
<div class="container" style="padding: 2rem 0;">
<h1>Proxy Card Service</h1>
<p>We offer high-quality proxy cards for playtesting purposes.</p>
<p>This service allows you to test out decks before committing to buying the real cards.</p>
<div style="margin-top: 2rem; padding: 1rem; background-color: var(--card-bg); border-radius: 8px;">
<h3>How it works</h3>
<ol style="margin-left: 1.5rem; margin-top: 1rem;">
<li>Browse our catalog or upload your deck list</li>
<li>Select the cards you want to proxy</li>
<li>Checkout and receive your cards</li>
</ol>
</div>
</div>
{% endblock %}

3
proxy/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

8
proxy/urls.py Normal file
View File

@@ -0,0 +1,8 @@
from django.urls import path
from . import views
app_name = 'proxy'
urlpatterns = [
path('info/', views.proxy_info, name='info'),
]

11
proxy/views.py Normal file
View File

@@ -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'
})