Files @ 2b1fd9ab90d9
Branch filter:

Location: website/www/conservancy/apps/assignment/models.py

bsturmfels
Add assignment date range.
from __future__ import unicode_literals

from django.db import models


class Assignment(models.Model):
    """A copyright assignment to Conservancy."""

    full_name = models.CharField(max_length=255)
    email = models.EmailField()
    place_of_residence = models.TextField(
        'Country of citizenship or residential address',
        blank=True)

    repository = models.URLField(
        'Code repository',
        blank=True,
    )
    coverage = models.CharField(
        verbose_name='Time period to assign',
        max_length=50,
        choices=[
            ('up to this year', 'One-off up to and including this year'),
            ('ongoing', 'All existing and new contributions'),
            ('specific', 'A specific period (details below)'),
        ],
        default='up to this year',
    )
    coverage_from = models.DateField(blank=True)
    coverage_to = models.DateField(blank=True)
    attestation_of_copyright = models.BooleanField(
        'I attest that I own the copyright on these works'
    )