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
50285c48
Commit
50285c48
authored
Apr 29, 2023
by
Star Neptune R. Sy
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
a5c8cc44
955b9e12
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
125 additions
and
27 deletions
+125
-27
models.py
widget_vincentdjango/assignments/models.py
+1
-1
makeItBeautiful.css
widget_vincentdjango/assignments/static/makeItBeautiful.css
+96
-0
base.html
widget_vincentdjango/assignments/templates/base.html
+4
-1
makeItBeautiful.css
...t_vincentdjango/assignments/templates/makeItBeautiful.css
+0
-0
assignment-add.html
...jango/assignments/templates/templates/assignment-add.html
+4
-4
assignment-details.html
...o/assignments/templates/templates/assignment-details.html
+5
-5
assignment-edit.html
...ango/assignments/templates/templates/assignment-edit.html
+5
-4
assignments.html
...ntdjango/assignments/templates/templates/assignments.html
+7
-9
urls.py
widget_vincentdjango/assignments/urls.py
+0
-1
views.py
widget_vincentdjango/assignments/views.py
+2
-2
settings.cpython-39.pyc
.../widget_vincentdjango/__pycache__/settings.cpython-39.pyc
+0
-0
settings.py
widget_vincentdjango/widget_vincentdjango/settings.py
+1
-0
No files found.
widget_vincentdjango/assignments/models.py
View file @
50285c48
...
@@ -10,7 +10,7 @@ class Course(models.Model):
...
@@ -10,7 +10,7 @@ class Course(models.Model):
class
Assignment
(
models
.
Model
):
class
Assignment
(
models
.
Model
):
assignment_name
=
models
.
CharField
(
unique
=
True
,
default
=
""
,
max_length
=
50
,)
assignment_name
=
models
.
CharField
(
"Name"
,
unique
=
True
,
default
=
""
,
max_length
=
50
,)
description
=
models
.
TextField
(
default
=
""
)
description
=
models
.
TextField
(
default
=
""
)
perfect_score
=
models
.
IntegerField
(
default
=
100
)
perfect_score
=
models
.
IntegerField
(
default
=
100
)
passing_score
=
models
.
IntegerField
(
default
=
80
)
passing_score
=
models
.
IntegerField
(
default
=
80
)
...
...
widget_vincentdjango/assignments/static/makeItBeautiful.css
0 → 100644
View file @
50285c48
body
{
background-color
:
rgb
(
167
,
36
,
75
)
}
div
.pageTitle
{
text-align
:
center
;
background-color
:
rgb
(
214
,
255
,
246
);
margin-left
:
20%
;
margin-right
:
20%
;
padding-top
:
10px
;
padding-bottom
:
15px
;
border-radius
:
0.5cm
;
border-width
:
15px
;
border-style
:
groove
double
;
border-color
:
rgb
(
138
,
0
,
0
);
box-shadow
:
0px
20px
40px
0px
rgb
(
65
,
2
,
23
),
0px
0px
40px
0px
rgb
(
175
,
212
,
204
)
inset
;
}
h1
.pageTitle
{
font-family
:
Helvetica
;
font-size
:
40pt
;
}
div
.content
{
background-color
:
rgb
(
214
,
255
,
246
);
margin-left
:
30%
;
margin-right
:
30%
;
padding-top
:
10px
;
padding-left
:
5%
;
padding-right
:
5%
;
padding-bottom
:
15px
;
border-radius
:
10px
;
border-width
:
9px
;
border-style
:
outset
;
border-color
:
rgb
(
138
,
0
,
0
);
box-shadow
:
0px
20px
40px
0px
rgb
(
65
,
2
,
23
);
}
li
{
background-color
:
rgb
(
214
,
255
,
246
);
font-size
:
14pt
;
transition
:
all
0.5s
;
}
li
:hover
{
background-color
:
rgb
(
255
,
209
,
228
);
font-size
:
20pt
;
transition
:
all
0.5s
;
}
div
.navButtons
{
background-color
:
rgb
(
255
,
248
,
238
);
border-radius
:
5px
;
border-width
:
12px
;
border-style
:
ridge
;
border-color
:
rgb
(
167
,
16
,
66
)
;
text-align
:
left
;
margin-right
:
50%
;
padding
:
15px
;
}
button
.buttonLink
{
padding
:
15px
;
font-size
:
12pt
;
scale
:
100%
;
background-color
:
rgb
(
5
,
233
,
157
);
}
button
.buttonLink
:hover
{
background-color
:
aquamarine
;
scale
:
105%
;
transition
:
all
100ms
;
}
button
.buttonLink
:active
{
background-color
:
rgb
(
201
,
226
,
218
);
}
label
{
width
:
180px
;
}
textarea
{
vertical-align
:
top
;
}
\ No newline at end of file
widget_vincentdjango/assignments/templates/base.html
View file @
50285c48
{% load static %}
<head>
<head>
<link
rel=
"stylesheet"
href=
"
templates/makeItBeautiful.css
"
>
<link
rel=
"stylesheet"
href=
"
{% static '/makeItBeautiful.css' %}
"
>
<title>
{% block webTitle %}{% endblock %}
</title>
<title>
{% block webTitle %}{% endblock %}
</title>
</head>
</head>
<body>
<body>
<div
class=
"pageTitle"
>
<h1
class=
"pageTitle"
>
{% block pageTitle %}{% endblock %}
</h1>
</div>
<div
class=
"pageTitle"
>
<h1
class=
"pageTitle"
>
{% block pageTitle %}{% endblock %}
</h1>
</div>
<br><br><br>
<div
class=
"content"
>
<div
class=
"content"
>
{% block content %}{% endblock %}
{% block content %}{% endblock %}
<div
class=
"navButtons"
>
<div
class=
"navButtons"
>
...
...
widget_vincentdjango/assignments/templates/makeItBeautiful.css
deleted
100644 → 0
View file @
a5c8cc44
widget_vincentdjango/assignments/templates/templates/assignment-add.html
View file @
50285c48
...
@@ -5,14 +5,14 @@
...
@@ -5,14 +5,14 @@
{% block pageTitle %} Add a new assignment {% endblock %}
{% block pageTitle %} Add a new assignment {% endblock %}
{% block content %}
{% block content %}
<form
id=
"editBook"
method=
"post"
>
<form
id=
"addAssignment"
method=
"post"
>
<b>
{% csrf_token %}
{% csrf_token %}
{{ form.as_p }}
{{ form.as_p }}
</b>
<input
type=
"submit"
id=
"submitButton"
value=
"Add assignment"
>
</form>
</form>
{% endblock %}
{% endblock %}
{% block otherButtons %}
{% block otherButtons %}
<button
class=
"buttonLink"
form=
"addAssignment"
onclick=
"window.location.href='assignments/';"
>
<b>
Add assignment
</b>
</button>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_vincentdjango/assignments/templates/templates/assignment-details.html
View file @
50285c48
...
@@ -5,13 +5,13 @@
...
@@ -5,13 +5,13 @@
{% block pageTitle %} {{object.assignment_name}} {% endblock %}
{% block pageTitle %} {{object.assignment_name}} {% endblock %}
{% block content %}
{% block content %}
<h2>
{{object.course}}
</h2>
<h2>
{{object.course}}
- {{object.section}}
</h2>
<p>
Description:
{{object.description}}
<br>
<p>
<b>
Description:
</b>
{{object.description}}
<br>
Perfect Score:
{{object.perfect_score}}
<br>
<b>
Perfect Score:
</b>
{{object.perfect_score}}
<br>
Passing Score:
{{object.passing_score}}
<br>
<b>
Passing Score:
</b>
{{object.passing_score}}
<br>
</p>
</p>
{% endblock %}
{% endblock %}
{% block otherButtons %}
{% block otherButtons %}
<a
class=
"buttonLink"
href=
"../edit"
>
Edit Assignment
</a
>
<button
class=
"buttonLink"
onclick=
"window.location.href='../../{{ object.get_absolute_url }}/edit';"
>
<b>
Edit Assignment
</b>
</button
>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_vincentdjango/assignments/templates/templates/assignment-edit.html
View file @
50285c48
...
@@ -5,14 +5,15 @@
...
@@ -5,14 +5,15 @@
{% block pageTitle %} Edit Assignment {% endblock %}
{% block pageTitle %} Edit Assignment {% endblock %}
{% block content %}
{% block content %}
<form
id=
"editBook"
method=
"post"
>
<form
id=
"editAssignment"
method=
"post"
>
<b>
{% csrf_token %}
{% csrf_token %}
{{ form.as_p }}
{{ form.as_p }}
</b>
<input
type=
"submit"
id=
"submitButton"
value=
"Edit assignment"
>
</form>
</form>
{% endblock %}
{% endblock %}
{% block otherButtons %}
{% block otherButtons %}
<button
class=
"buttonLink"
form=
"editAssignment"
onclick=
"window.location.href='assignments/';"
>
<b>
Save changes to assignment
</b>
</button>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_vincentdjango/assignments/templates/templates/assignments.html
View file @
50285c48
{% extends 'base.html' %}
{% extends 'base.html' %}
{% block webTitle %} Assignments {% endblock %}
{% block webTitle %}
Widget's
Assignments {% endblock %}
{% block pageTitle %}
A
ssignments {% endblock %}
{% block pageTitle %}
Welcome to Widget's a
ssignments {% endblock %}
{% block content %}
{% block content %}
<ul
style=
'list-style-type:square;'
>
<ul
style=
'list-style-type:square;'
>
...
@@ -13,11 +13,9 @@
...
@@ -13,11 +13,9 @@
{% endblock %}
{% endblock %}
{% block otherButtons %}
{% block otherButtons %}
<div
class=
"content"
>
<button
class=
"buttonLink"
onclick=
"window.location.href='add/';"
>
<b>
New Assignment
</b>
</button><br><br>
<a
class=
"buttonLink"
href=
"add/"
>
New Assignments
</a>
<br>
<a
class=
"miniLink"
href=
"/dashboard"
>
Dashboard
</a>
<br>
<a
class=
"miniLink"
href=
"/dashboard"
>
Dashboard
</a>
<br>
<a
class=
"miniLink"
href=
"/announcementBoard"
>
Announcements
</a>
<br>
<a
class=
"miniLink"
href=
"/announcementBoard"
>
Announcements
</a>
<br>
<a
class=
"miniLink"
href=
"/forum"
>
Forum
</a>
<br>
<a
class=
"miniLink"
href=
"/forum"
>
Forum
</a>
<br>
<a
class=
"miniLink"
href=
"/widget_calendar"
>
Calendar
</a>
<br>
<a
class=
"miniLink"
href=
"/widget_calendar"
>
Calendar
</a>
<br>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_vincentdjango/assignments/urls.py
View file @
50285c48
from
django.urls
import
path
from
django.urls
import
path
from
.views
import
homeAssignmentsPage
,
AssignmentsDetailView
,
AssignmentsUpdateView
,
AssignmentsCreateView
from
.views
import
homeAssignmentsPage
,
AssignmentsDetailView
,
AssignmentsUpdateView
,
AssignmentsCreateView
urlpatterns
=
[
urlpatterns
=
[
path
(
''
,
homeAssignmentsPage
,
name
=
'homePage'
),
path
(
''
,
homeAssignmentsPage
,
name
=
'homePage'
),
path
(
'add/'
,
AssignmentsCreateView
.
as_view
(),
name
=
'assignment_add'
),
path
(
'add/'
,
AssignmentsCreateView
.
as_view
(),
name
=
'assignment_add'
),
...
...
widget_vincentdjango/assignments/views.py
View file @
50285c48
...
@@ -20,7 +20,7 @@ class AssignmentsDetailView(DetailView):
...
@@ -20,7 +20,7 @@ class AssignmentsDetailView(DetailView):
class
AssignmentsUpdateView
(
UpdateView
):
class
AssignmentsUpdateView
(
UpdateView
):
model
=
Assignment
model
=
Assignment
fields
=
"__all__"
fields
=
[
"assignment_name"
,
"description"
,
"course"
,
"perfect_score"
]
template_name
=
"templates/assignment-edit.html"
template_name
=
"templates/assignment-edit.html"
success_url
=
"../details"
success_url
=
"../details"
...
@@ -28,7 +28,7 @@ class AssignmentsUpdateView(UpdateView):
...
@@ -28,7 +28,7 @@ class AssignmentsUpdateView(UpdateView):
class
AssignmentsCreateView
(
CreateView
):
class
AssignmentsCreateView
(
CreateView
):
model
=
Assignment
model
=
Assignment
fields
=
"__all__"
fields
=
[
"assignment_name"
,
"description"
,
"course"
,
"perfect_score"
]
template_name
=
"templates/assignment-add.html"
template_name
=
"templates/assignment-add.html"
def
get_success_url
(
self
):
def
get_success_url
(
self
):
...
...
widget_vincentdjango/widget_vincentdjango/__pycache__/settings.cpython-39.pyc
View file @
50285c48
No preview for this file type
widget_vincentdjango/widget_vincentdjango/settings.py
View file @
50285c48
...
@@ -126,6 +126,7 @@ USE_TZ = True
...
@@ -126,6 +126,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.2/howto/static-files/
# https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_URL
=
'/static/'
STATIC_URL
=
'/static/'
STATIC_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'static'
)
# Default primary key field type
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
...
...
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