Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_father when can i be on my own i have the hello world to see
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
father when can i be on my own i have the hello world to see
widget_father when can i be on my own i have the hello world to see
Commits
11952712
Commit
11952712
authored
May 23, 2022
by
Emilio Gentolia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created template for new announcemnts
parent
e9cc7b5e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
1 deletion
+48
-1
announcement_form.css
...ent_board/static/announcement_board/announcement_form.css
+14
-0
announcement_detail.html
...ard/templates/announcement_board/announcement_detail.html
+1
-1
announcement_form.html
...board/templates/announcement_board/announcement_form.html
+21
-0
index.html
announcement_board/templates/announcement_board/index.html
+1
-0
views.py
announcement_board/views.py
+8
-0
urls.py
..._can_i_be_on_my_own_i_have_the_hello_world_to_see/urls.py
+3
-0
No files found.
announcement_board/static/announcement_board/announcement_form.css
0 → 100644
View file @
11952712
label
{
font-family
:
Khula
;
font-weight
:
600
;
}
input
{
font-family
:
Khula
;
}
p
{
margin
:
30px
0px
;
}
form
{
padding-bottom
:
20px
;
}
\ No newline at end of file
announcement_board/templates/announcement_board/announcement_detail.html
View file @
11952712
...
...
@@ -2,7 +2,7 @@
{% extends 'base.html' %}
{% load static %}
{% block title %}
Homepage
{% endblock %}
{% block title %}
Announcements
{% endblock %}
{% block styles %}
<link
rel=
"stylesheet"
href=
"{% static 'announcement_board/announcement_detail.css' %}"
>
...
...
announcement_board/templates/announcement_board/announcement_form.html
0 → 100644
View file @
11952712
<!-- announcements/announcement_form.html -->
{% extends 'base.html' %}
{% load static %}
{% block title %}Announcements{% endblock %}
{% block styles %}
<link
rel=
"stylesheet"
href=
"{% static 'announcements/announcement_form.css' %}"
>
{% endblock %}
{% block header %}
New Announcement
{% endblock %}
{% block content %}
<form
enctype=
"multipart/form-data"
method=
"post"
>
{% csrf_token %}
{{ form.as_p }}
<input
type=
"submit"
value=
"Save Announcement"
>
</form>
{% endblock %}
\ No newline at end of file
announcement_board/templates/announcement_board/index.html
View file @
11952712
...
...
@@ -26,4 +26,5 @@ Announcement Board
</li>
{% endfor %}
</ul>
<a
class=
"new-user-link"
href=
"/announcements/add"
>
New Announcement
</a>
{% endblock %}
\ No newline at end of file
announcement_board/views.py
View file @
11952712
from
django.shortcuts
import
render
from
django.views
import
View
from
django.views.generic.detail
import
DetailView
from
django.views.generic.edit
import
CreateView
from
.models
import
Announcement
,
Reaction
...
...
@@ -22,3 +23,10 @@ class AnnouncementDetailView(DetailView):
return
context
class
AnnouncementCreateView
(
CreateView
):
model
=
Announcement
fields
=
[
"announcement_title"
,
"announcement_body"
,
"author"
,
"announcement_pic"
]
def
get_success_url
(
self
):
return
"/announcements/"
widget_father_when_can_i_be_on_my_own_i_have_the_hello_world_to_see/urls.py
View file @
11952712
...
...
@@ -18,6 +18,7 @@ from django.urls import path, include
from
django.conf.urls.static
import
static
from
django.conf
import
settings
from
homepage.views
import
WidgetUserCreateView
from
announcement_board.views
import
AnnouncementCreateView
urlpatterns
=
[
path
(
'homepage/'
,
include
(
"homepage.urls"
,
namespace
=
'homepage'
)),
...
...
@@ -27,6 +28,8 @@ urlpatterns = [
path
(
'forum/'
,
include
(
"forum.urls"
,
namespace
=
'forum'
)),
path
(
'announcements/'
,
include
(
"announcement_board.urls"
,
namespace
=
'announcement_board'
)),
path
(
'announcements/add'
,
AnnouncementCreateView
.
as_view
(),
name
=
'announcement_form'
),
path
(
'assignments/'
,
include
(
"assignments.urls"
,
namespace
=
'assignments'
)),
]
...
...
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