Files @ 956f8c6fdaad
Branch filter:

Location: website/conservancy/usethesource/forms.py

bsturmfels
podjango: Add "Podcast" model to support multiple podcasts

Each Cast (episode) can belong to one or more Podcast, allowing episodes to be
shared between podcasts. This enables us introductory episodes to be delivered
in their own feed, but also included in the main "The Corresponding Source"
feed.

This required adding an additional `podcast_slug` argument to most views. The
date archive views were dropped because they're not linked to from anywhere.

Added a `podcasts` view as an index of all available Podcasts.
from django import forms

from .models import Comment


class CommentForm(forms.ModelForm):
    post_to_list = forms.BooleanField(required=False)

    class Meta:
        model = Comment
        fields = ['time', 'attribute_to', 'message', 'post_to_list']

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.fields['time'].widget.input_type = 'datetime-local'


class DownloadForm(forms.Form):
    agree = forms.BooleanField(label="I understand that the goal of this process is to determine compliance with FOSS licenses, and that in downloading the source code candidate and/or firmware image, I am assisting SFC as a volunteer to investigate that question.  I, therefore, promise and represent that I will not copy, distribute, modify, or otherwise use this source code candidate and/or firmware image for any purpose other than to help SFC evaluate the source code candidate for compliance with the terms of FOSS licenses, including but not limited to any version of the GNU General Public License.  Naturally, if I determine in good faith that portions of the source code candidate and/or firmware image are subject to a FOSS license and are compliant with it, I may copy, distribute, modify, or otherwise use those portions in accordance with the FOSS license, and I take full responsibility for that determination and subsequent use.")