Source

ytmanager / mcyoutube / forms.py

Full commit
from django import forms

class SearchForm(forms.Form):
    ORDERBY_RELEVANCE = 'relevance'
    ORDERBY_VIEWCOUNT = 'viewCount'
    ORDERBY_PUBLISHED = 'published'
    ORDERBY_RATING = 'rating'
    ORDERBY_CHOICES = (
        (ORDERBY_RELEVANCE, 'Relevance'),
        (ORDERBY_VIEWCOUNT, 'Views count'),
        (ORDERBY_PUBLISHED, 'Published date'),
        (ORDERBY_RATING, 'Rating'),
    )

    q = forms.CharField()
    orderby = forms.ChoiceField(choices=ORDERBY_CHOICES)