Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_robo_mommy
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Raul Jarod Conanan
midterm_robo_mommy
Commits
22037e05
Commit
22037e05
authored
Mar 04, 2023
by
RJC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forumpost_list.html template added for listview
parent
f5700d85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
0001_initial.py
widget_robo_mommy/forum/migrations/0001_initial.py
+51
-0
forumpost_list.html
widget_robo_mommy/forum/templates/forum/forumpost_list.html
+14
-0
No files found.
widget_robo_mommy/forum/migrations/0001_initial.py
0 → 100644
View file @
22037e05
# Generated by Django 3.2 on 2023-03-04 08:44
import
django.contrib.auth.models
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
(
'auth'
,
'0012_alter_user_first_name_max_length'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'WidgetUser'
,
fields
=
[
(
'user_ptr'
,
models
.
OneToOneField
(
auto_created
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
parent_link
=
True
,
primary_key
=
True
,
serialize
=
False
,
to
=
'auth.user'
)),
],
options
=
{
'verbose_name'
:
'user'
,
'verbose_name_plural'
:
'users'
,
'abstract'
:
False
,
},
bases
=
(
'auth.user'
,),
managers
=
[
(
'objects'
,
django
.
contrib
.
auth
.
models
.
UserManager
()),
],
),
migrations
.
CreateModel
(
name
=
'Reply'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'body'
,
models
.
TextField
(
blank
=
True
,
null
=
True
)),
(
'pub_datetime'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
'author'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'reply'
,
to
=
'forum.widgetuser'
)),
],
),
migrations
.
CreateModel
(
name
=
'ForumPost'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'title'
,
models
.
CharField
(
blank
=
True
,
max_length
=
255
,
null
=
True
)),
(
'body'
,
models
.
TextField
(
blank
=
True
,
null
=
True
)),
(
'pub_datetime'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
'author'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'forumpost'
,
to
=
'forum.widgetuser'
)),
],
),
]
widget_robo_mommy/forum/templates/forum/forumpost_list.html
0 → 100644
View file @
22037e05
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Forum Post List
</title>
</head>
<ul>
{% for forumpost in object_list %}
<li>
{{forumpost.title}}
</li>
{%empty%}
<li>
No forumposts yet.
</li>
{%endfor%}
</ul>
</html>
\ 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