Development of an internal social media platform with personalised dashboards for students
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.

forms.py 422B

6 years ago
123456789101112131415
  1. from django import forms
  2. from .models import Post, CustomUser
  3. from taggit.forms import *
  4. from django.contrib.auth.forms import UserCreationForm, UserChangeForm
  5. class PostForm(forms.ModelForm):
  6. class Meta:
  7. model = Post
  8. fields = ('title', 'text', 'published_date','tags')
  9. class NewTagForm(forms.ModelForm):
  10. m_tags = TagField()
  11. class Meta:
  12. model = CustomUser
  13. fields = ['m_tags']