Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_robo_mommy
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Raul Jarod Conanan
midterm_robo_mommy
Commits
244fd7c7
Commit
244fd7c7
authored
Mar 06, 2023
by
RJC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event app course field foreign keyed to assignment app course
parent
2b804b8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
models.py
widget_robo_mommy/widget_Calendar/models.py
+2
-1
views.py
widget_robo_mommy/widget_Calendar/views.py
+1
-1
No files found.
widget_robo_mommy/widget_Calendar/models.py
View file @
244fd7c7
from
django.db
import
models
from
django.db
import
models
from
Assignments.models
import
Course
MODE_TYPES
=
(
MODE_TYPES
=
(
...
@@ -24,7 +25,7 @@ class Event(models.Model):
...
@@ -24,7 +25,7 @@ class Event(models.Model):
Location
,
Location
,
on_delete
=
models
.
CASCADE
on_delete
=
models
.
CASCADE
)
)
course
=
models
.
CharField
(
max_length
=
20
)
course
=
models
.
ForeignKey
(
Course
,
related_name
=
'event'
,
on_delete
=
models
.
CASCADE
,
null
=
True
)
def
__str__
(
self
):
def
__str__
(
self
):
return
'{} on {}'
.
format
(
self
.
activity
,
self
.
target_datetime
)
return
'{} on {}'
.
format
(
self
.
activity
,
self
.
target_datetime
)
widget_robo_mommy/widget_Calendar/views.py
View file @
244fd7c7
...
@@ -17,7 +17,7 @@ def index(request):
...
@@ -17,7 +17,7 @@ def index(request):
eventItem
.
target_datetime
,
eventItem
.
target_datetime
,
eventItem
.
activity
,
eventItem
.
activity
,
eventItem
.
estimated_hours
,
eventItem
.
estimated_hours
,
eventItem
.
course
,
eventItem
.
course
.
code
,
eventItem
.
location
.
mode
,
eventItem
.
location
.
mode
,
eventItem
.
location
.
venue
,
eventItem
.
location
.
venue
,
)
)
...
...
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