mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
replace drf by django-ninja
This commit is contained in:
1 parent
d9531838f2
commit
3046438cb1
43 files changed
+1001
-1191
No files matched your search
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in new issue
Block a user