Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_someone here is possessed by an owl
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
Laetitia de Castro
widget_someone here is possessed by an owl
Commits
3006f89c
Commit
3006f89c
authored
Apr 03, 2022
by
Titia de Castro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated announcements view
parent
39ee8f3a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
views.cpython-310.pyc
announcements/__pycache__/views.cpython-310.pyc
+0
-0
views.py
announcements/views.py
+8
-1
No files found.
announcements/__pycache__/views.cpython-310.pyc
View file @
3006f89c
No preview for this file type
announcements/views.py
View file @
3006f89c
from
django.shortcuts
import
render
from
django.shortcuts
import
render
from
django.http
import
HttpResponse
from
django.http
import
HttpResponse
from
.models
import
Announcement
# Create your views here.
# Create your views here.
def
index
(
request
):
def
index
(
request
):
return
HttpResponse
(
"This is the Announcement Board!"
)
formatted_announcements
=
"ANNOUCNEMENTS:<br>"
\ No newline at end of file
for
announcement
in
Announcement
.
objects
.
all
():
formatted_announcements
+=
announcement
.
getAnnouncement
()
+
"<br>"
return
HttpResponse
(
formatted_announcements
)
\ 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