You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
# Create your models here.
|
|
|
|
|
|
|
|
|
|
|
|
class Admin(models.Model):
|
|
|
|
username = models.CharField(max_length=32, primary_key=True, name="username", verbose_name="管理员账号", blank=True)
|
|
|
|
password = models.CharField(max_length=128, name="password", verbose_name="管理员密码", blank=True)
|
|
|
|
|
|
|
|
def to_dict(self):
|
|
|
|
return {"username": self.username, "password": self.password}
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
db_table = "Eduadmin"
|
|
|
|
verbose_name = "管理员"
|