Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_vincentdjango
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
1
Merge Requests
1
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
Almira Redoble
midterm_vincentdjango
Commits
aecfefec
Commit
aecfefec
authored
Apr 28, 2023
by
Star Neptune R. Sy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first try on the FBV homepage
parent
3077688c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
2 deletions
+46
-2
models.py
widget_vincentdjango/assignments/models.py
+4
-0
base.html
widget_vincentdjango/assignments/templates/base.html
+10
-0
makeItBeautiful.css
...t_vincentdjango/assignments/templates/makeItBeautiful.css
+0
-0
assignments.html
...ntdjango/assignments/templates/templates/assignments.html
+26
-0
urls.py
widget_vincentdjango/assignments/urls.py
+2
-2
views.py
widget_vincentdjango/assignments/views.py
+4
-0
No files found.
widget_vincentdjango/assignments/models.py
View file @
aecfefec
...
...
@@ -24,5 +24,9 @@ class Assignment(models.Model):
def
__str__
(
self
):
return
'{} {}-'
.
format
(
self
.
assignment_name
,
self
.
section
,)
def
get_absolute_url
(
self
):
return
'{}'
.
format
(
self
.
pk
)
widget_vincentdjango/assignments/templates/base.html
0 → 100644
View file @
aecfefec
<head>
<link
rel=
"stylesheet"
href=
"makeItBeautiful.css"
>
<title>
{% block webTitle %}{% endblock %}
</title>
</head>
<body>
{% block pageTitle %}{% endblock %}
{% block content %}{% endblock %}
{% block otherButtons %} {% endblock %}
</body>
\ No newline at end of file
widget_vincentdjango/assignments/templates/makeItBeautiful.css
0 → 100644
View file @
aecfefec
widget_vincentdjango/assignments/templates/templates/assignments.html
0 → 100644
View file @
aecfefec
{% extends 'base.html' %}
{% block webTitle %} Assignments {% endblock %}
{% block pageTitle %}
<h1>
Assignments
</h1>
{% endblock %}
{% block content %}
<div
class=
"content"
>
<ul
style=
"list-style-type:square;"
>
{% for assignment in {{ assignmentsList }}.object.all() %}
<li>
<div
class=
"assignmentLink"
>
<a
href=
"{{ assignment.get_absolute_url }}/details"
>
{{ assignment.assignment_name }}
</a>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endblock %}
{% block otherButtons %}
<div
class=
"content"
>
<a
class=
"buttonLink"
href=
"add/"
>
New Assignments
</a>
<a
class=
"miniLink"
href=
"/dashboard"
>
Dashboard
</a>
<a
class=
"miniLink"
href=
"/announcements"
>
Announcements
</a>
<a
class=
"miniLink"
href=
"/forum"
>
Forum
</a>
<a
class=
"miniLink"
href=
"/calendar"
>
Calendar
</a>
</div>
{% endblock %}
\ No newline at end of file
widget_vincentdjango/assignments/urls.py
View file @
aecfefec
from
django.urls
import
path
from
.views
import
index
from
.views
import
homeAssignmentsPage
urlpatterns
=
[
path
(
''
,
index
,
name
=
'index
'
),
path
(
''
,
homeAssignmentsPage
,
name
=
'homePage
'
),
]
...
...
widget_vincentdjango/assignments/views.py
View file @
aecfefec
...
...
@@ -4,6 +4,10 @@ from django.http import HttpResponse
from
.models
import
Assignment
def
homeAssignmentsPage
(
request
):
return
render
(
request
,
'templates/assignments.html'
,
{
'assignmentsList'
:
Assignment
})
def
index
(
request
):
head
=
"<h1 style='border-bottom:4px solid lightgray;
\
...
...
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