From e10388929155ac4fee218483ac6e271cc3af45aa Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 31 May 2023 13:47:22 +0200 Subject: [PATCH] blog model and better bad request page --- gawa/blog/models.py | 10 +++++++++- gawa/start/templates/errors/bad_request.html | 12 +++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gawa/blog/models.py b/gawa/blog/models.py index 71a8362..76582a7 100644 --- a/gawa/blog/models.py +++ b/gawa/blog/models.py @@ -1,3 +1,11 @@ from django.db import models -# Create your models here. +class BlogPost(models.Model): + """ + Should contain a blogpost + """ + title = models.CharField(max_length=50) + subtitle = models.CharField(max_length=50) + desc = models.CharField(max_length=250, unique=True) + body = models.TextField() + date = models.DateField(blank=True) diff --git a/gawa/start/templates/errors/bad_request.html b/gawa/start/templates/errors/bad_request.html index fe8ccc5..c380aea 100644 --- a/gawa/start/templates/errors/bad_request.html +++ b/gawa/start/templates/errors/bad_request.html @@ -1 +1,11 @@ -400 you fucked up +{% extends 'start/base.html' %} +{% load i18n %} +{% get_current_language as LANGUAGE_CODE %} +{% block languagecode %}{{ LANGUAGE_CODE }}{% endblock languagecode %} +{% block title %}{% translate "cscherr.de" %} - {% translate "startpage" %}{% endblock title %} +{% block main %} +
+

{% translate "Bad request" %}

+

{% translate "You fucked up" %}

+
+{% endblock main %}