renamed list to category

This commit is contained in:
DerTyp187
2021-11-10 08:54:20 +01:00
parent 0423b92c2b
commit 4a7b65b721
6 changed files with 24 additions and 13 deletions

View File

@@ -20,7 +20,7 @@
<h1>TealFire</h1>
<div>
<a>Python</a>
<a href="/category/python/">Python</a>
<a>C#</a>
<a>C++</a>
<a>C</a>
@@ -29,11 +29,7 @@
</div>
</header>
<main>
<div id="main-content">
<div id="main-headline">
<h2>How To Convert a String to Int</h2>
</div>
<div id="main-content">
{% block content %}{% endblock %}
</div>

View File

@@ -1,7 +1,6 @@
{% extends "main/base.html" %}
{% block content %}
<div id="main-content-code">
<pre><code style="padding-top: 5px; padding-bottom: 5px;"class="language-c">int c;
c = int.c * t/g;</code></pre>
</div>
<div id="main-headline">
<h2>Index</h2>
</div>
{% endblock content %}

View File

@@ -0,0 +1,12 @@
{% extends "main/base.html" %}
{% block content %}
<div id="main-headline">
<h2>How To Convert a String to Int</h2>
</div>
<div id="main-content-code">
<pre><code style="padding-top: 5px; padding-bottom: 5px;"class="language-c">int c;
c = int.c * t/g;</code></pre>
</div>
{% endblock content %}

View File

@@ -3,5 +3,6 @@ from . import views
urlpatterns = [
path('', views.index, name="main-index"),
path('list/', views.list, name="main-list"),
path('topic/<str:category>/<str:topic>/', views.topic, name="main-topic"),
path('category/<str:category>/', views.category, name="main-category"),
]

View File

@@ -3,5 +3,8 @@ from django.shortcuts import render
def index(req):
return render(req, "main/index.html")
def list(req):
return render(req, "main/list.html")
def topic(req, category, topic):
return render(req, "main/topic.html")
def category(req, category):
return render(req, "main/category.html")