Files
edx-platform/openedx/features/announcements/forms.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

22 lines
424 B
Python

"""
Forms for the Announcement Editor
"""
from django import forms
from .models import Announcement
class AnnouncementForm(forms.ModelForm):
"""
Form for editing Announcements
"""
content = forms.CharField(widget=forms.Textarea, label='', required=False)
active = forms.BooleanField(initial=True, required=False)
class Meta:
model = Announcement
fields = ['content', 'active']