Clean up old style class definitions
This commit is contained in:
@@ -38,7 +38,7 @@ class MicrositeMiddleware(object):
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
class MicrositeSessionCookieDomainMiddleware():
|
class MicrositeSessionCookieDomainMiddleware(object):
|
||||||
"""
|
"""
|
||||||
Special case middleware which should be at the very end of the MIDDLEWARE list (so that it runs first
|
Special case middleware which should be at the very end of the MIDDLEWARE list (so that it runs first
|
||||||
on the process_response chain). This middleware will define a wrapper function for the set_cookie() function
|
on the process_response chain). This middleware will define a wrapper function for the set_cookie() function
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ class CourseOutlineSection(CourseOutlineContainer, CourseOutlineChild):
|
|||||||
self.add_child()
|
self.add_child()
|
||||||
|
|
||||||
|
|
||||||
class ExpandCollapseLinkState:
|
class ExpandCollapseLinkState(object):
|
||||||
"""
|
"""
|
||||||
Represents the three states that the expand/collapse link can be in
|
Represents the three states that the expand/collapse link can be in
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -141,13 +141,16 @@ class WarningMessagesTest(CourseOutlineTest):
|
|||||||
FUTURE_UNPUBLISHED_WARNING = 'Unpublished changes to content that will release in the future'
|
FUTURE_UNPUBLISHED_WARNING = 'Unpublished changes to content that will release in the future'
|
||||||
NEVER_PUBLISHED_WARNING = 'Unpublished units will not be released'
|
NEVER_PUBLISHED_WARNING = 'Unpublished units will not be released'
|
||||||
|
|
||||||
class PublishState:
|
class PublishState(object):
|
||||||
|
"""
|
||||||
|
Default values for representing the published state of a unit
|
||||||
|
"""
|
||||||
NEVER_PUBLISHED = 1
|
NEVER_PUBLISHED = 1
|
||||||
UNPUBLISHED_CHANGES = 2
|
UNPUBLISHED_CHANGES = 2
|
||||||
PUBLISHED = 3
|
PUBLISHED = 3
|
||||||
VALUES = [NEVER_PUBLISHED, UNPUBLISHED_CHANGES, PUBLISHED]
|
VALUES = [NEVER_PUBLISHED, UNPUBLISHED_CHANGES, PUBLISHED]
|
||||||
|
|
||||||
class UnitState:
|
class UnitState(object):
|
||||||
""" Represents the state of a unit """
|
""" Represents the state of a unit """
|
||||||
|
|
||||||
def __init__(self, is_released, publish_state, is_locked):
|
def __init__(self, is_released, publish_state, is_locked):
|
||||||
|
|||||||
Reference in New Issue
Block a user