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

View File

@@ -1,7 +1,6 @@
{% extends "main/base.html" %} {% extends "main/base.html" %}
{% block content %} {% block content %}
<div id="main-content-code"> <div id="main-headline">
<pre><code style="padding-top: 5px; padding-bottom: 5px;"class="language-c">int c; <h2>Index</h2>
c = int.c * t/g;</code></pre> </div>
</div>
{% endblock content %} {% 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 = [ urlpatterns = [
path('', views.index, name="main-index"), 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): def index(req):
return render(req, "main/index.html") return render(req, "main/index.html")
def list(req): def topic(req, category, topic):
return render(req, "main/list.html") return render(req, "main/topic.html")
def category(req, category):
return render(req, "main/category.html")