使用DRF开发API

This commit is contained in:
2025-11-15 12:12:09 +08:00
parent 3a0e3e9ad1
commit fe052af0f1
9 changed files with 63 additions and 0 deletions

8
myapp_api/models.py Normal file
View File

@@ -0,0 +1,8 @@
from django.db import models
# Create your models here.
class User(models.Model):
name = models.CharField(max_length=100)
city = models.CharField(max_length=100)
sex = models.CharField(max_length=100)
age = models.IntegerField()