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
37818654
Commit
37818654
authored
Mar 04, 2023
by
Star Neptune R. Sy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
models.py has appropriate fields for each data
parent
350938e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
models.py
widget_vincentdjango/assignments/models.py
+19
-1
urls.py
widget_vincentdjango/assignments/urls.py
+10
-0
No files found.
widget_vincentdjango/assignments/models.py
View file @
37818654
from
django.db
import
models
from
django.db
import
models
# Create your models here.
class
Course
(
models
.
Model
):
course_code
=
models
.
CharField
(
unique
=
True
,
default
=
""
)
course_title
=
models
.
CharField
(
unique
=
True
,
default
=
""
)
class
Assignment
(
models
.
Model
):
assignment_name
=
models
.
CharField
(
unique
=
True
,
default
=
""
)
description
=
models
.
TextField
(
default
=
""
)
perfect_score
=
models
.
IntegerField
()
passing_score
=
models
.
IntegerField
()
section
=
models
.
CharField
(
unique
=
True
)
course
=
models
.
ForeignKey
(
Course
,
on_delete
=
models
.
CASCADE
,
related_name
=
'subject'
)
widget_vincentdjango/assignments/urls.py
View file @
37818654
from
django.urls
import
path
from
.views
import
index
urlpatterns
=
[
path
(
''
,
index
,
name
=
'index'
),
]
app_name
=
"assignments"
\ 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