removed hosting from db

This commit is contained in:
Alie 2023-07-27 10:36:24 +02:00
parent ffc10a7059
commit 9a6665c675
3 changed files with 3 additions and 12 deletions

View File

@ -4,4 +4,6 @@ rsync -rv webpage django:/home/django/personalWebpage/
ssh django "bash -s" <<EOF
cd /home/django/personalWebpage/
python3 manage.py collectstatic --noinput
python3 manage.py makemigrations
python3 manage.py migrate
EOF

View File

@ -5,5 +5,4 @@ class Booksigner(models.Model):
name = models.CharField(max_length=50)
website = models.CharField(blank=True, max_length=200)
email = models.EmailField(blank=True, )
comment = models.CharField(blank=True, max_length=500)
hosting = models.CharField(max_length=10)
comment = models.CharField(blank=True, max_length=500)

View File

@ -57,15 +57,6 @@ def signbook(request):
newsigner["website"] = form.cleaned_data['website']
newsigner["email"] = form.cleaned_data['email']
newsigner["comment"] = form.cleaned_data['comment']
host = request.META["SERVER_NAME"]
print(host)
match host:
case "localhost":
newsigner["hosting"] = "Local"
case r".*\.fai.st":
newsigner["hosting"] = "fai"
case _:
newsigner["hosting"] = "???"
signer_list = Booksigner.objects.all()
if newsigner:
@ -74,7 +65,6 @@ def signbook(request):
email=newsigner["email"],
website=newsigner["website"],
comment=newsigner["comment"],
hosting=newsigner["hosting"],
)
context = {
"title": "THE GUESTBOOK",