Source

django-weekday-field / weekday_field / forms.py

1
2
3
4
5
6
7
8
9
from django import forms

import utils

class WeekdayFormField(forms.TypedMultipleChoiceField):
    def __init__(self, *args, **kwargs):
        kwargs['choices'] = utils.DAY_CHOICES
        kwargs.pop('max_length', None)
        super(WeekdayFormField, self).__init__(*args, **kwargs)