Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group 23
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
Bianca Aguilar
widget_group 23
Commits
c794d226
Commit
c794d226
authored
May 19, 2022
by
Alissandra Gabrielle C. Tanaliga
Browse files
Options
Browse Files
Download
Plain Diff
Finishing assignments app
parents
41298b77
16231c67
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
43 additions
and
2 deletions
+43
-2
0004_alter_reaction_announcement.cpython-310.pyc
...ycache__/0004_alter_reaction_announcement.cpython-310.pyc
+0
-0
0012_post_image.py
forum/migrations/0012_post_image.py
+19
-0
0013_alter_post_image.py
forum/migrations/0013_alter_post_image.py
+18
-0
0012_post_image.cpython-310.pyc
forum/migrations/__pycache__/0012_post_image.cpython-310.pyc
+0
-0
0013_alter_post_image.cpython-310.pyc
...rations/__pycache__/0013_alter_post_image.cpython-310.pyc
+0
-0
models.py
forum/models.py
+1
-0
post_detail.html
forum/templates/forum/post_detail.html
+3
-2
forum1.jpg
widget_group_23/static/images/forum1.jpg
+0
-0
urls.py
widget_group_23/urls.py
+2
-0
No files found.
announcements/migrations/__pycache__/0004_alter_reaction_announcement.cpython-310.pyc
View file @
c794d226
No preview for this file type
forum/migrations/0012_post_image.py
0 → 100644
View file @
c794d226
# Generated by Django 4.0.3 on 2022-05-19 16:08
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'forum'
,
'0011_alter_post_pub_date_alter_reply_pub_date'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'post'
,
name
=
'image'
,
field
=
models
.
ImageField
(
default
=
1
,
upload_to
=
'images/'
),
preserve_default
=
False
,
),
]
forum/migrations/0013_alter_post_image.py
0 → 100644
View file @
c794d226
# Generated by Django 4.0.3 on 2022-05-19 16:13
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'forum'
,
'0012_post_image'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'post'
,
name
=
'image'
,
field
=
models
.
ImageField
(
upload_to
=
'forum/images/'
),
),
]
forum/migrations/__pycache__/0012_post_image.cpython-310.pyc
0 → 100644
View file @
c794d226
File added
forum/migrations/__pycache__/0013_alter_post_image.cpython-310.pyc
0 → 100644
View file @
c794d226
File added
forum/models.py
View file @
c794d226
...
@@ -10,6 +10,7 @@ class Post(models.Model):
...
@@ -10,6 +10,7 @@ class Post(models.Model):
'homepage.WidgetUser'
,
'homepage.WidgetUser'
,
on_delete
=
models
.
CASCADE
on_delete
=
models
.
CASCADE
)
)
image
=
models
.
ImageField
(
upload_to
=
"forum/images/"
)
def
__str__
(
self
):
def
__str__
(
self
):
return
'{}'
.
format
(
self
.
post_title
)
return
'{}'
.
format
(
self
.
post_title
)
...
...
forum/templates/forum/post_detail.html
View file @
c794d226
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<h1>
{{ object.post_title }}
</h1>
<h1>
{{ object.post_title }}
</h1>
<h2>
by {{ object.author.first_name }} {{ object.author.last_name }}, {{ object.pub_date|date:"d/m/Y" }}
</h2>
<h2>
by {{ object.author.first_name }} {{ object.author.last_name }}, {{ object.pub_date|date:"d/m/Y" }}
</h2>
<p>
{{ object.post_body }}
</p>
<p>
{{ object.post_body }}
</p>
<img
src=
"{
% static 'images/forum.jpg' %
}"
>
<img
src=
"{
{ object.image.url }
}"
>
</div>
</div>
<ul
class=
"replies"
>
<ul
class=
"replies"
>
{% for r in object.comments.all %}
{% for r in object.comments.all %}
...
@@ -22,3 +22,4 @@
...
@@ -22,3 +22,4 @@
</ul>
</ul>
</div>
</div>
{% endblock %}
{% endblock %}
widget_group_23/static/images/forum.jpg
→
widget_group_23/static/images/forum
1
.jpg
View file @
c794d226
File moved
widget_group_23/urls.py
View file @
c794d226
...
@@ -15,6 +15,8 @@ Including another URLconf
...
@@ -15,6 +15,8 @@ Including another URLconf
"""
"""
from
django.contrib
import
admin
from
django.contrib
import
admin
from
django.urls
import
include
,
path
from
django.urls
import
include
,
path
from
django.conf
import
settings
from
django.conf.urls.static
import
static
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls.static
import
static
from
django.conf.urls.static
import
static
...
...
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