add a placeholder dice page to the website

This commit is contained in:
2026-05-14 18:58:04 -05:00
parent 3f1e0e7af3
commit 4e9661aafa
4 changed files with 19 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
{% extends 'base.html' %}
{% block title %}dice{% endblock %}
{% block content %}
<div>
<h1>dice, by dr.botzo</h1>
<p>Under construction.</p>
</div>
{% endblock %}
+2 -1
View File
@@ -1,8 +1,9 @@
"""URL patterns for the dice views."""
from django.urls import path
from dice.views import rpc_roll_dice
from dice.views import index, rpc_roll_dice
urlpatterns = [
path('', index, name='dice_index'),
path('rpc/roll/', rpc_roll_dice, name='dice_rpc_roll_dice'),
]
+6
View File
@@ -2,6 +2,7 @@
import json
import logging
from django.shortcuts import render
from rest_framework.authentication import BasicAuthentication
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
@@ -13,6 +14,11 @@ logger = logging.getLogger(__name__)
roller = DiceRoller()
def index(request):
"""Display a landing page until I can do more."""
return render(request, 'dice/index.html')
@api_view(['POST'])
@authentication_classes((BasicAuthentication, ))
@permission_classes((IsAuthenticated, ))
+1
View File
@@ -41,6 +41,7 @@ INSTALLED_APPS = [
'bootstrap3',
'rest_framework',
'countdown',
'dice',
'dispatch',
'facts',
'ircbot',