blog model and better bad request page

This commit is contained in:
Christoph J. Scherr 2023-05-31 13:47:22 +02:00
parent 91447b1ba9
commit e103889291
Signed by: PlexSheep
GPG Key ID: 25B4ACF7D88186CC
2 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,11 @@
from django.db import models 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)

View File

@ -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 %}
<div class="jumbotron text-center">
<h1>{% translate "Bad request" %}</h1>
<p>{% translate "You fucked up" %}</p>
</div>
{% endblock main %}