Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_princessgabi
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
Ysabella Panghulan
midterm_princessgabi
Commits
e51551c9
Commit
e51551c9
authored
May 14, 2023
by
Ysabella Panghulan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'forumv2'
parents
fd0861ab
8c6b1465
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
20 deletions
+53
-20
forum.css
widget_princessgabi/forum/static/forum.css
+0
-0
forum.css
widget_princessgabi/forum/static/forum/forum.css
+14
-0
forumpost-add.html
widget_princessgabi/forum/templates/forum/forumpost-add.html
+7
-0
forumpost-details.html
...princessgabi/forum/templates/forum/forumpost-details.html
+24
-19
forumpost-edit.html
...et_princessgabi/forum/templates/forum/forumpost-edit.html
+7
-0
urls.py
widget_princessgabi/forum/urls.py
+1
-1
No files found.
widget_princessgabi/forum/static/forum.css
deleted
100644 → 0
View file @
fd0861ab
widget_princessgabi/forum/static/forum/forum.css
View file @
e51551c9
body
{
height
:
100vh
;
background-color
:
#E9E3FE
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.forum-content
{
margin-top
:
auto
;
padding
:
2rem
;
border-radius
:
0.5rem
;
background-color
:
white
}
widget_princessgabi/forum/templates/forum/forumpost-add.html
View file @
e51551c9
...
@@ -2,6 +2,10 @@
...
@@ -2,6 +2,10 @@
{% load static %}
{% load static %}
{% block stylesheets %}
<link
rel =
"stylesheet"
type =
"text/css"
href =
"{% static 'stylesheets/forms.css' %}"
>
{% endblock %}
{% block title %}Add Post{% endblock %}
{% block title %}Add Post{% endblock %}
{% block content %}
{% block content %}
...
@@ -18,9 +22,12 @@
...
@@ -18,9 +22,12 @@
{% endfor %}
{% endfor %}
<h1>
Add a new post:
</h1>
<h1>
Add a new post:
</h1>
<div
class =
"form"
>
<form
method =
'POST'
>
<form
method =
'POST'
>
{% csrf_token %}
{% csrf_token %}
{{ form.as_p }}
{{ form.as_p }}
<input
type =
"submit"
value =
"Save New Post"
>
<input
type =
"submit"
value =
"Save New Post"
>
</form>
</form>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_princessgabi/forum/templates/forum/forumpost-details.html
View file @
e51551c9
...
@@ -2,27 +2,32 @@
...
@@ -2,27 +2,32 @@
{% load static %}
{% load static %}
{% block stylesheets %}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'forum/forum.css' %}"
>
<link
rel=
"stylesheet"
href=
"'https://cdnjs.cloudfare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
>
{% endblock %}
{% block title %} {{ object.title }} {% endblock %}
{% block title %} {{ object.title }} {% endblock %}
{% block content %}
<div
class =
"forum-content"
>
<h1>
{{ object.title }}
</h1>
{% block content %}
<h2>
by {{ object.author.first_name }} {{ object.author.last_name }}
</h2>
<h1>
{{ object.title }}
</h1>
<h3>
{{ object.pub_datetime|date:'m/d/Y, H:i A' }}
</h2>
<h2>
by {{ object.author.first_name }} {{ object.author.last_name }}
</h2>
<p>
{{ object.body }}
</h2>
<h3>
{{ object.pub_datetime|date:'m/d/Y, H:i A' }}
</h2>
<p>
{{ object.body }}
</h2>
<h2>
POST REPLIES:
</h2>
<ul>
<h2>
POST REPLIES:
</h2>
{% for reply in object.replies.all %}
<ul>
<li>
{% for reply in object.replies.all %}
<h2>
by {{ reply.author.first_name }} {{ reply.author.last_name }}
</h2>
<li>
<h3>
by {{ reply.pub_datetime|date:'m/d/Y, H:i A' }}
</h3>
<h2>
by {{ reply.author.first_name }} {{ reply.author.last_name }}
</h2>
<p>
{{ reply.body }}
</p>
<h3>
by {{ reply.pub_datetime|date:'m/d/Y, H:i A' }}
</h3>
</li>
<p>
{{ reply.body }}
</p>
{% endfor %}
</li>
</ul>
{% endfor %}
</ul>
<form
action =
"./edit"
>
<a
href =
"{% url 'forum:forumpost-edit' forumpost.id %}"
class =
"edit-btn"
><i
class =
"fa fa-edit"
></i>
Edit Post
</a>
<input
type =
"submit"
value =
"Edit Post"
>
</div>
</form>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_princessgabi/forum/templates/forum/forumpost-edit.html
View file @
e51551c9
...
@@ -2,6 +2,10 @@
...
@@ -2,6 +2,10 @@
{% load static %}
{% load static %}
{% block stylesheets %}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'stylesheets/forms.css' %}"
>
{% endblock %}
{% block title %}Edit Post{% endblock %}
{% block title %}Edit Post{% endblock %}
{% block content %}
{% block content %}
...
@@ -18,9 +22,12 @@
...
@@ -18,9 +22,12 @@
{% endfor %}
{% endfor %}
<h1>
Edit Post:
</h1>
<h1>
Edit Post:
</h1>
<div
class =
"forum"
>
<form
method =
'POST'
>
<form
method =
'POST'
>
{% csrf_token %}
{% csrf_token %}
{{ form.as_p }}
{{ form.as_p }}
<input
type =
"submit"
value =
"Save Changes to Post"
>
<input
type =
"submit"
value =
"Save Changes to Post"
>
</form>
</form>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_princessgabi/forum/urls.py
View file @
e51551c9
...
@@ -5,7 +5,7 @@ urlpatterns = [
...
@@ -5,7 +5,7 @@ urlpatterns = [
path
(
''
,
forum
,
name
=
"forum"
),
path
(
''
,
forum
,
name
=
"forum"
),
path
(
"forum/forumposts/<int:pk>/details/"
,
ForumPostDetailView
.
as_view
(),
name
=
"forumpost-details"
),
path
(
"forum/forumposts/<int:pk>/details/"
,
ForumPostDetailView
.
as_view
(),
name
=
"forumpost-details"
),
path
(
'forumposts/add'
,
ForumPostCreateView
.
as_view
(),
name
=
"forumpost-add"
),
path
(
'forumposts/add'
,
ForumPostCreateView
.
as_view
(),
name
=
"forumpost-add"
),
path
(
'forumposts/<int:pk>/edit'
,
ForumPostUpdateView
.
as_view
(),
name
=
"forumpost-edit"
)
path
(
'forumposts/<int:pk>/edit'
,
ForumPostUpdateView
.
as_view
(),
name
=
"forumpost-edit"
)
]
]
app_name
=
"forum"
app_name
=
"forum"
\ No newline at end of file
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