intranet.apps.bus package¶
Submodules¶
intranet.apps.bus.admin module¶
intranet.apps.bus.api module¶
-
class
intranet.apps.bus.api.
RouteDetail
(**kwargs)[source]¶ Bases:
rest_framework.generics.RetrieveAPIView
API endpoint that retrieves information about a specific bus route.
/api/bus/<num>: retrieve information about bus number <num>
-
permission_classes
= (<class 'intranet.apps.auth.rest_permissions.DenyRestrictedPermission'>,)¶
-
serializer_class
¶
-
-
class
intranet.apps.bus.api.
RouteList
(**kwargs)[source]¶ Bases:
rest_framework.generics.ListAPIView
API endpoint that retrieves information about buses.
/api/bus: retrieve a list of all buses
/api/bus/num: retrieve information about bus number num
-
permission_classes
= (<class 'intranet.apps.auth.rest_permissions.DenyRestrictedPermission'>,)¶
-
serializer_class
¶
-
intranet.apps.bus.consumers module¶
intranet.apps.bus.models module¶
-
class
intranet.apps.bus.models.
Route
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
A bus route (e.g. TJ-24)
-
ARRIVAL_STATUSES
= (('a', 'Arrived (In the lot)'), ('d', 'Delayed'), ('o', 'On Time (Expected)'))¶
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
bus_number
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_status_display
(*, field=<django.db.models.fields.CharField: status>)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
route_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
space
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
status
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-