mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-10 00:03:24 +00:00
16 lines
334 B
Python
16 lines
334 B
Python
|
from ninja import ModelSchema, Schema
|
||
|
|
||
|
from core.models import User
|
||
|
|
||
|
|
||
|
class SimpleUserSchema(ModelSchema):
|
||
|
"""A schema with the minimum amount of information to represent a user."""
|
||
|
|
||
|
class Meta:
|
||
|
model = User
|
||
|
fields = ["id", "nick_name", "first_name", "last_name"]
|
||
|
|
||
|
|
||
|
class MarkdownSchema(Schema):
|
||
|
text: str
|