Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_Francoconuts
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Chester Tan
widget_Francoconuts
Commits
fc7602a2
Commit
fc7602a2
authored
Apr 03, 2022
by
Chester Tan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
altered fields in Course model
updated the display format of Assignments views
parent
b99e11d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
0004_alter_course_course_code_alter_course_course_title.py
...004_alter_course_course_code_alter_course_course_title.py
+23
-0
models.py
widget_Francoconuts/assignments/models.py
+2
-2
assignments.html
...conuts/assignments/templates/assignments/assignments.html
+1
-1
No files found.
widget_Francoconuts/assignments/migrations/0004_alter_course_course_code_alter_course_course_title.py
0 → 100644
View file @
fc7602a2
# Generated by Django 4.0.3 on 2022-04-03 06:08
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'assignments'
,
'0003_assignment_course'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'course'
,
name
=
'course_code'
,
field
=
models
.
CharField
(
max_length
=
10
),
),
migrations
.
AlterField
(
model_name
=
'course'
,
name
=
'course_title'
,
field
=
models
.
CharField
(
max_length
=
100
),
),
]
widget_Francoconuts/assignments/models.py
View file @
fc7602a2
from
django.db
import
models
class
Course
(
models
.
Model
):
course_code
=
models
.
Slug
Field
(
max_length
=
10
)
course_title
=
models
.
Slug
Field
(
max_length
=
100
)
course_code
=
models
.
Char
Field
(
max_length
=
10
)
course_title
=
models
.
Char
Field
(
max_length
=
100
)
section
=
models
.
CharField
(
max_length
=
3
)
def
__str__
(
self
):
...
...
widget_Francoconuts/assignments/templates/assignments/assignments.html
View file @
fc7602a2
...
...
@@ -4,5 +4,5 @@
<p>
Description: {{assignment.description}}
</p>
<p>
Perfect Score: {{assignment.max_points}}
</p>
<p>
Passing Score: {{assignment.passing_score}}
</p>
<p>
Course/Section: {{assignment.course.course_code}}
-{{assignment.course.course_title}}-
{{assignment.course.section}}
</p><br>
<p>
Course/Section: {{assignment.course.course_code}}
{{assignment.course.course_title}}
{{assignment.course.section}}
</p><br>
{% endfor %}
\ 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