feat: redirect to itch.io
This commit is contained in:
parent
3f5f2feff8
commit
ffe28e9a19
2 changed files with 6 additions and 0 deletions
|
@ -3,6 +3,7 @@ from django.urls import path
|
|||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index, name='index'),
|
||||
path('add/<str:origin>/<str:name>/<str:color>/<str:shirt>/<str:hat>/<str:decor>/', views.add, name='add'),
|
||||
path('get/<str:origin>/', views.get, name='get'),
|
||||
]
|
|
@ -3,6 +3,7 @@ import random
|
|||
|
||||
from django.db import IntegrityError
|
||||
from django.http import HttpResponse, Http404
|
||||
from django.shortcuts import redirect
|
||||
|
||||
from server.filters import ProfanityFilter
|
||||
from server.models import Dragon
|
||||
|
@ -46,3 +47,7 @@ def get(request, origin):
|
|||
response_data = {'origin': random_item.origin, 'name': random_item.name, 'color': random_item.color,
|
||||
'shirt': random_item.shirt, 'hat': random_item.hat, 'decor': random_item.decor}
|
||||
return HttpResponse(json.dumps(response_data), content_type="application/json")
|
||||
|
||||
|
||||
def index(request):
|
||||
return redirect('https://geri8.itch.io/la-torreta-del-drac')
|
Loading…
Add table
Add a link
Reference in a new issue