add a placeholder dice page to the website
This commit is contained in:
@@ -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
@@ -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'),
|
||||
]
|
||||
|
||||
@@ -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, ))
|
||||
|
||||
@@ -41,6 +41,7 @@ INSTALLED_APPS = [
|
||||
'bootstrap3',
|
||||
'rest_framework',
|
||||
'countdown',
|
||||
'dice',
|
||||
'dispatch',
|
||||
'facts',
|
||||
'ircbot',
|
||||
|
||||
Reference in New Issue
Block a user