Add API
This commit is contained in:
26
app/web/templates/layouts/base.html
Normal file
26
app/web/templates/layouts/base.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}{% endblock %} | Djanker News</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{% url 'list' %}">List</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'add-news' %}">Add News</a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
<main>
|
||||
<h1>Djanker News</h1>
|
||||
{% block main %}{% endblock %}
|
||||
</main>
|
||||
<footer>
|
||||
2021 Djanker News
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
10
app/web/templates/pages/add-news.html
Normal file
10
app/web/templates/pages/add-news.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
12
app/web/templates/pages/list.html
Normal file
12
app/web/templates/pages/list.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends 'layouts/base.html' %}
|
||||
{% block title %}Welcome{% endblock %}
|
||||
{% block main %}
|
||||
{% for item in news %}
|
||||
<article>
|
||||
<h2>{{ item.title }}</h2>
|
||||
<p>
|
||||
<a href="{{ item.url }}">Ver completo</a>
|
||||
</p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user