Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_Francoconuts
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Chester Tan
widget_Francoconuts
Commits
c7376ace
Commit
c7376ace
authored
May 23, 2022
by
Mario Franco C. Deuna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed commented lines and styled template files.
parent
bbb1efd5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
42 deletions
+12
-42
post_detail.html
widget_Francoconuts/forum/templates/Forum/post_detail.html
+7
-4
post_list.html
widget_Francoconuts/forum/templates/Forum/post_list.html
+5
-5
views.py
widget_Francoconuts/forum/views.py
+0
-33
hypers.jpg
..._Francoconuts/widget_Francoconuts/static/forum/hypers.jpg
+0
-0
No files found.
widget_Francoconuts/forum/templates/Forum/post_detail.html
View file @
c7376ace
<h1>
<h1
style=
"background-color:DodgerBlue;"
>
{{post.post_title}}
{{post.post_title}}
</h1>
</h1>
<h4>
<h4
style=
"background-color:Aquamarine;"
>
{{post.
post_author.first_name}} {{post.post_
author.last_name}}, {{post.pub_date.day}}/{{post.pub_date.month}}/{{post.pub_date.year}}
{{post.
author.first_name}} {{post.
author.last_name}}, {{post.pub_date.day}}/{{post.pub_date.month}}/{{post.pub_date.year}}
</h4>
</h4>
<h3>
<h3
style=
"background-color:Aquamarine;"
>
{{post.post_body}}
{{post.post_body}}
</h3>
</h3>
...
@@ -32,4 +32,7 @@
...
@@ -32,4 +32,7 @@
{% endfor %}
{% endfor %}
{% load static %}
<marquee
behavior=
"alternate"
scrollamount=
"200"
><img
src=
"{% static 'forum/hypers.jpg' %}"
alt=
"image"
>
</ul>
</ul>
widget_Francoconuts/forum/templates/Forum/post_list.html
View file @
c7376ace
{% extends 'base.html' %}
{% extends 'base.html' %}
{% block content %}
{% block content %}
<h1
>
Welcome to the Widget's Forum!
</h1>
<h1
style=
"background-color:DodgerBlue;"
><center>
Welcome to the Widget's Forum!
</center>
</h1>
{% if object_list %}
{% if object_list %}
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
{% for post in object_list %}
{% for post in object_list %}
<h3>
<h3
style=
"background-color:Aquamarine;"
>
<li>
<li>
<a
href =
"{% url 'forum:forum-detail' post.id %}"
>
{{post.post_title}}
</a>
<a
href =
"{% url 'forum:forum-detail' post.id %}"
>
{{post.post_title}}
</a>
<br>
by {{post.
post_author.first_name}} {{post.post_
author.last_name}} dated {{post.pub_date.day}}/{{post.pub_date.month}}/{{post.pub_date.year}}
<br>
by {{post.
author.first_name}} {{post.
author.last_name}} dated {{post.pub_date.day}}/{{post.pub_date.month}}/{{post.pub_date.year}}
</li>
</li>
</h3>
</h3>
...
@@ -21,12 +21,12 @@
...
@@ -21,12 +21,12 @@
{% else %}
{% else %}
<p>
<p
style=
"background-color:Tomato;"
>
No posts available.
No posts available.
</p>
</p>
{% endif %}
{% endif %}
<
a
href=
"{% url 'forum:post-add' %}"
><button>
New Forum Post
</button></a
>
<
h1
style=
"background-color:Aquamarine;"
><center><a
href=
"{% url 'forum:post-add' %}"
><button
style=
"background-color:Tomato;"
><h1>
New Forum Post
</button></a></h1
>
{% endblock content %}
{% endblock content %}
widget_Francoconuts/forum/views.py
View file @
c7376ace
...
@@ -6,39 +6,6 @@ from django.views.generic.detail import DetailView
...
@@ -6,39 +6,6 @@ from django.views.generic.detail import DetailView
from
django.views.generic.list
import
ListView
from
django.views.generic.list
import
ListView
from
.forms
import
PostForm
from
.forms
import
PostForm
#def get_reply():
#
# text=''
# for reply in Reply.objects.all():
# text += (
# 'Reply by {} {} '.format(reply.author.first_name,
# reply.author.last_name)
# + 'dated {}').format(reply.pub_date.strftime('%x')
# + ':<br>'
# + '{}<br>'.format(reply.reply_body)
# )
# return text
#
#def forum(request):
#
# text = '<h1>FORUM POSTS:</h1>'
#
# for post in Post.objects.all():
# text += (
# '{} '.format(post.post_title)
# + 'by {} {} '.format(post.author.first_name,
# post.author.last_name)
# + 'dated {}').format(post.pub_date.strftime('%x')
# + ':<br>'
# + '{}<br>'.format(post.post_body)
# + get_reply()
# + '<br>'
# )
#
# return HttpResponse(text)
class
ForumListView
(
ListView
):
class
ForumListView
(
ListView
):
model
=
Post
model
=
Post
ordering
=
[
"-pub_date"
]
ordering
=
[
"-pub_date"
]
...
...
widget_Francoconuts/widget_Francoconuts/static/forum/hypers.jpg
0 → 100644
View file @
c7376ace
120 KB
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