structure create

This commit is contained in:
RobbieHan
2018-10-19 19:22:54 +08:00
parent 2bba133771
commit f72efee2e1
15 changed files with 618 additions and 46 deletions

View File

@@ -3,8 +3,15 @@
# @File : forms.py
from django import forms
from .models import Structure
class LoginForm(forms.Form):
username = forms.CharField(required=True, error_messages={"requeired": "请填写用户名"})
password = forms.CharField(required=True, error_messages={"requeired": "请填写密码"})
password = forms.CharField(required=True, error_messages={"requeired": "请填写密码"})
class StructureForm(forms.ModelForm):
class Meta:
model = Structure
fields = ['type', 'name', 'parent']