Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI 41 Project
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
Patricia Isabella Nava
CSCI 41 Project
Commits
c5d81beb
Commit
c5d81beb
authored
Dec 02, 2022
by
Patricia Isabella Nava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix __str__ output of Schedule object
parent
3472aa69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
models.py
MagisAir/booking/models.py
+6
-0
No files found.
MagisAir/booking/models.py
View file @
c5d81beb
...
@@ -69,6 +69,9 @@ class Schedule(models.Model):
...
@@ -69,6 +69,9 @@ class Schedule(models.Model):
Flight_Cost
=
models
.
IntegerField
(
default
=
0
)
Flight_Cost
=
models
.
IntegerField
(
default
=
0
)
Flight_Code
=
models
.
ForeignKey
(
Flight
,
on_delete
=
models
.
CASCADE
)
Flight_Code
=
models
.
ForeignKey
(
Flight
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
return
str
(
self
.
Sched_Code
)
class
Booking
(
models
.
Model
):
class
Booking
(
models
.
Model
):
Booking_ID
=
models
.
AutoField
(
primary_key
=
True
,
editable
=
False
,
unique
=
True
)
Booking_ID
=
models
.
AutoField
(
primary_key
=
True
,
editable
=
False
,
unique
=
True
)
...
@@ -131,6 +134,9 @@ class Booking_Sched(models.Model):
...
@@ -131,6 +134,9 @@ class Booking_Sched(models.Model):
Booking_ID
=
models
.
ForeignKey
(
Booking
,
on_delete
=
models
.
CASCADE
)
Booking_ID
=
models
.
ForeignKey
(
Booking
,
on_delete
=
models
.
CASCADE
)
Sched_Code
=
models
.
ForeignKey
(
Schedule
,
on_delete
=
models
.
CASCADE
)
Sched_Code
=
models
.
ForeignKey
(
Schedule
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
return
'Booking No. '
+
str
(
self
.
Booking_ID
)
+
' - Sched Code: '
+
str
(
self
.
Sched_Code
)
class
Crew_Member
(
models
.
Model
):
class
Crew_Member
(
models
.
Model
):
Employee_ID
=
models
.
AutoField
(
primary_key
=
True
,
editable
=
False
,
unique
=
True
)
Employee_ID
=
models
.
AutoField
(
primary_key
=
True
,
editable
=
False
,
unique
=
True
)
...
...
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