feat(submissions): base submissions frontend + api
This commit is contained in:
@@ -1 +1,17 @@
|
||||
# Create your views here.
|
||||
from django.http import HttpRequest
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from games.models import Game
|
||||
|
||||
|
||||
@login_required
|
||||
def submission_home(request: HttpRequest, game: str):
|
||||
game_obj = get_object_or_404(Game, path=f"/submissions/{game}", enabled=True)
|
||||
return render(
|
||||
request,
|
||||
"submissions.html",
|
||||
{
|
||||
"game": game_obj,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user