Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group17
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vaughn Nephi Fajardo
widget_group17
Commits
b4484b2e
Commit
b4484b2e
authored
May 10, 2022
by
Miguel Luis D. Bandelaria
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: added base template into the forums app and modified detail template
parent
2f2f0e03
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
12 deletions
+47
-12
models.cpython-39.pyc
widget_group_17/forum/__pycache__/models.cpython-39.pyc
+0
-0
base.html
widget_group_17/forum/templates/forum/base.html
+18
-0
detail.html
widget_group_17/forum/templates/forum/detail.html
+16
-3
index.html
widget_group_17/forum/templates/forum/index.html
+13
-9
models.cpython-39.pyc
widget_group_17/homepage/__pycache__/models.cpython-39.pyc
+0
-0
No files found.
widget_group_17/forum/__pycache__/models.cpython-39.pyc
View file @
b4484b2e
No preview for this file type
widget_group_17/forum/templates/forum/base.html
0 → 100644
View file @
b4484b2e
{% load static %}
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'homepage/style.css' %}"
>
<title>
Website
</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>
\ No newline at end of file
widget_group_17/forum/templates/forum/detail.html
View file @
b4484b2e
<h1>
{{ post.post_title }}
</h1>
{% extends "forum/base.html" %}
<h3>
by {{ post.author.first_name }}, {{ post.pub_date|date:"SHORT_DATE_FORMAT" }}
</h3>
<p>
{{ post.post_body }}
</p>
{% block content %}
\ No newline at end of file
<h1>
{{ post.post_title }}
</h1>
<h3>
by {{ post.author.first_name }} {{ post.author.last_name }}, {{ post.pub_date|date:"SHORT_DATE_FORMAT" }}
</h3>
<p>
{{ post.post_body }}
</p>
{% if reply.associated_post is post %}
<ul>
{% for reply in reply_list %}
<li>
{{ reply.reply_body }}
</li>
{% endfor %}
</ul>
{% else %}
<p>
No replies available for this post.
</p>
{% endif %}
{% endblock %}
\ No newline at end of file
widget_group_17/forum/templates/forum/index.html
View file @
b4484b2e
{% if posts_list %}
{% extends "forum/base.html" %}
{% block content%}
{% if posts_list %}
<ul>
<ul>
{% for post in posts_list %}
{% for post in posts_list %}
<li><a
href=
"{% url 'forum:detail' post.id %}"
>
{{ post.post_title }}
</a>
by {{ post.author_id.first_name }} {{ post.author_id
.last_name}} dated {{ post.pub_date|date:"SHORT_DATE_FORMAT" }}
</li>
<li><a
href=
"{% url 'forum:detail' post.id %}"
>
{{ post.post_title }}
</a>
by {{ post.author.first_name }} {{ post.author
.last_name}} dated {{ post.pub_date|date:"SHORT_DATE_FORMAT" }}
</li>
{% endfor %}
{% endfor %}
</ul>
</ul>
{% else %}
{% else %}
<p>
No posts are available.
</p>
<p>
No posts are available.
</p>
{% endif %}
{% endif %}
\ No newline at end of file
{% endblock %}
\ No newline at end of file
widget_group_17/homepage/__pycache__/models.cpython-39.pyc
View file @
b4484b2e
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment