Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group 23
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
Bianca Aguilar
widget_group 23
Commits
ac2640cb
Commit
ac2640cb
authored
Apr 06, 2022
by
Alissandra Gabrielle C. Tanaliga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Populated models and fixed formatting for Assigmments and Homepage
parent
0df07f44
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
+13
-6
models.cpython-310.pyc
assignments/__pycache__/models.cpython-310.pyc
+0
-0
models.py
assignments/models.py
+6
-2
db.sqlite3
db.sqlite3
+0
-0
models.cpython-310.pyc
homepage/__pycache__/models.cpython-310.pyc
+0
-0
models.py
homepage/models.py
+7
-4
No files found.
assignments/__pycache__/models.cpython-310.pyc
View file @
ac2640cb
No preview for this file type
assignments/models.py
View file @
ac2640cb
...
...
@@ -10,8 +10,12 @@ class Course(models.Model):
def
course_info
(
self
):
return
'{} {} {}'
.
format
(
self
.
course_code
,
self
.
course_title
,
self
.
section
)
@
property
def
course_shorthand
(
self
):
return
'{} {}'
.
format
(
self
.
course_code
,
self
.
section
)
def
__str__
(
self
):
return
'{} {}'
.
format
(
self
.
course
,
self
.
section
)
return
'{} {}'
.
format
(
self
.
course
_code
,
self
.
section
)
class
Assignment
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
50
)
...
...
@@ -35,4 +39,4 @@ class Assignment(models.Model):
return
assignment
def
__str__
(
self
):
return
'{} - {}'
.
format
(
self
.
name
,
self
.
course
.
__str__
)
\ No newline at end of file
return
'{} - {}'
.
format
(
self
.
name
,
self
.
course
.
course_shorthand
)
\ No newline at end of file
db.sqlite3
View file @
ac2640cb
No preview for this file type
homepage/__pycache__/models.cpython-310.pyc
View file @
ac2640cb
No preview for this file type
homepage/models.py
View file @
ac2640cb
...
...
@@ -22,9 +22,6 @@ class WidgetUser(models.Model):
department
=
models
.
ForeignKey
(
Department
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
return
'{}, {} {}'
.
format
(
self
.
last_name
,
self
.
first_name
,
self
.
middle_name
)
@
property
def
forum_name
(
self
):
return
'{} {}'
.
format
(
self
.
first_name
,
self
.
last_name
)
...
...
@@ -32,4 +29,10 @@ class WidgetUser(models.Model):
@
property
def
user_info
(
self
):
return
'<br>{}: {}, {}, {}'
.
format
(
self
.
__str__
,
self
.
id_num
,
self
.
email
,
self
.
department
.
dept_info
)
\ No newline at end of file
user
=
'<br>{}, {} {}: '
.
format
(
self
.
last_name
,
self
.
first_name
,
self
.
middle_name
)
user
+=
'{}, {}, {}'
.
format
(
self
.
id_num
,
self
.
email
,
self
.
department
.
dept_info
)
return
user
def
__str__
(
self
):
return
'{}, {} {}'
.
format
(
self
.
last_name
,
self
.
first_name
,
self
.
middle_name
)
\ 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