mirror of
https://github.com/RobbieHan/sandboxMP.git
synced 2026-04-27 04:10:06 +08:00
menu create
This commit is contained in:
@@ -6,7 +6,7 @@ import re
|
||||
from django import forms
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
from .models import Structure
|
||||
from .models import Structure, Menu
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
@@ -118,4 +118,10 @@ class PasswordChangeForm(forms.Form):
|
||||
password = cleaned_data.get("password")
|
||||
confirm_password = cleaned_data.get("confirm_password")
|
||||
if password != confirm_password:
|
||||
raise forms.ValidationError("两次密码输入不一致")
|
||||
raise forms.ValidationError("两次密码输入不一致")
|
||||
|
||||
|
||||
class MenuForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Menu
|
||||
fields = '__all__'
|
||||
|
||||
Reference in New Issue
Block a user