|
123456789101112131415 |
- from django import forms
- from .models import Post, CustomUser
- from taggit.forms import *
- from django.contrib.auth.forms import UserCreationForm, UserChangeForm
-
- class PostForm(forms.ModelForm):
- class Meta:
- model = Post
- fields = ('title', 'text', 'published_date','tags')
-
- class NewTagForm(forms.ModelForm):
- m_tags = TagField()
- class Meta:
- model = CustomUser
- fields = ['m_tags']
|