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 614B

12345678910111213141516171819202122
  1. from django import forms
  2. from datetime import datetime
  3. from .models import Post, CustomUser
  4. from django.forms import ModelForm, ValidationError
  5. from taggit.forms import *
  6. from django.contrib.auth.forms import UserCreationForm, UserChangeForm
  7. from datetime import datetime
  8. from croniter import croniter
  9. from django.forms import ModelForm, ValidationError
  10. class PostForm(forms.ModelForm):
  11. class Meta:
  12. model = Post
  13. fields = ('title', 'text', 'published_date','tags')
  14. class NewTagForm(forms.ModelForm):
  15. tags = TagField()
  16. class Meta:
  17. model = CustomUser
  18. fields = ['tags']