mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 15:33:45 +00:00
# Ceci est la combinaison de 4 commits.
# Ceci est le premier message de validation : Add building to the room serialiser # Ceci est le message de validation numéro 2 : Add dormitory to the building serialiser # Ceci est le message de validation numéro 3 : Add dormitory to the building serialiser # Ceci est le message de validation numéro 4 : Add dormitory to the building serialiser
This commit is contained in:
parent
2219582163
commit
89f91add15
1 changed files with 8 additions and 2 deletions
|
@ -115,8 +115,14 @@ class BuildingSerializer(NamespacedHMSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = topologie.Building
|
model = topologie.Building
|
||||||
fields = ("name", "api_url")
|
fields = ("name", "dormitory", "api_url")
|
||||||
|
|
||||||
|
class DormitorySerializer(NamespaceHMSerializer):
|
||||||
|
"""Serialize `topologie.models.Dormitory` objects
|
||||||
|
"""
|
||||||
|
class Meta:
|
||||||
|
model = topologie.Dormitory
|
||||||
|
fields = ("name", "api_url")
|
||||||
|
|
||||||
class SwitchPortSerializer(NamespacedHMSerializer):
|
class SwitchPortSerializer(NamespacedHMSerializer):
|
||||||
"""Serialize `topologie.models.Port` objects
|
"""Serialize `topologie.models.Port` objects
|
||||||
|
@ -176,7 +182,7 @@ class RoomSerializer(NamespacedHMSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = topologie.Room
|
model = topologie.Room
|
||||||
fields = ("name", "details", "api_url")
|
fields = ("name", "building", "details", "api_url")
|
||||||
|
|
||||||
|
|
||||||
class PortProfileSerializer(NamespacedHMSerializer):
|
class PortProfileSerializer(NamespacedHMSerializer):
|
||||||
|
|
Loading…
Reference in a new issue