adding proxy code
This commit is contained in:
0
proxy/__init__.py
Normal file
0
proxy/__init__.py
Normal file
3
proxy/admin.py
Normal file
3
proxy/admin.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
||||||
5
proxy/apps.py
Normal file
5
proxy/apps.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class ProxyConfig(AppConfig):
|
||||||
|
name = "proxy"
|
||||||
0
proxy/migrations/__init__.py
Normal file
0
proxy/migrations/__init__.py
Normal file
3
proxy/models.py
Normal file
3
proxy/models.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
# Create your models here.
|
||||||
20
proxy/templates/proxy/info.html
Normal file
20
proxy/templates/proxy/info.html
Normal 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
3
proxy/tests.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
||||||
8
proxy/urls.py
Normal file
8
proxy/urls.py
Normal 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
11
proxy/views.py
Normal 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'
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user