working on views
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 35s

This commit is contained in:
Pierre Geeraert
2025-05-30 11:51:23 +01:00
parent 385d42d0be
commit 80a75a445e
5 changed files with 68 additions and 4 deletions
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
{% load bootstrap5 %}
{% bootstrap_css %}
{% bootstrap_javascript %}
</head>
<body>
<h1 class="display-1">Welcome to my website!</h1>
<div class="container">
<div class="list-group">
{% if thislist %}
<ul>
{% for question in thislist %}
<a href="#" class="list-group-item">{{ question }}</a>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}
</div>
</div>
{% block content %}
{% endblock %}
</div>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome to my website!</h1>
{% if thislist %}
<ul>
{% for question in thislist %}
<h1>{{ question }}</h1>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}
</body>
</html>
+9
View File
@@ -0,0 +1,9 @@
from django.shortcuts import render
def home(request):
thislist = ["apple", "banana", "cherry"]
return render(request, 'home.html',{'thislist': thislist})
def about(request):
thislist = ["apple", "banana", "cherry"]
return render(request, 'about.html',{'thislist': thislist})