Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open
Commits
0fd61159
Unverified
Commit
0fd61159
authored
Apr 02, 2017
by
David Haynes
🙆
Browse files
refactor: __unicode__ -> __str__ in models
- deprecation fix Signed-off-by:
David Haynes
<
dhaynes3@gmu.edu
>
parent
a167e64c
Pipeline
#1204
passed with stage
in 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
whats_open/website/models.py
View file @
0fd61159
...
...
@@ -20,7 +20,7 @@ class Category(TimeStampedModel):
# Sort by name in admin view
ordering
=
[
'name'
]
def
__
unicode
__
(
self
):
def
__
str
__
(
self
):
return
'%s'
%
self
.
name
class
Facility
(
TimeStampedModel
):
...
...
@@ -67,7 +67,7 @@ class Facility(TimeStampedModel):
return
True
return
False
def
__
unicode
__
(
self
):
def
__
str
__
(
self
):
return
self
.
name
class
Schedule
(
TimeStampedModel
):
...
...
@@ -95,7 +95,7 @@ class Schedule(TimeStampedModel):
return
True
return
False
def
__
unicode
__
(
self
):
def
__
str
__
(
self
):
return
self
.
name
...
...
@@ -151,7 +151,7 @@ class OpenTime(TimeStampedModel):
return
False
return
True
def
__
unicode
__
(
self
):
def
__
str
__
(
self
):
weekdays
=
[
'Monday'
,
'Tuesday'
,
'Wednesday'
,
'Thursday'
,
'Friday'
,
'Saturday'
,
'Sunday'
]
return
'%s %s to %s %s'
%
(
weekdays
[
self
.
start_day
],
...
...
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