forms.py 687 B

12345678910111213141516171819202122232425
  1. from django import forms
  2. class ExportScrobbleForm(forms.Form):
  3. """Provide options for downloading scrobbles"""
  4. EXPORT_TYPES = (
  5. ("as", "Audioscrobbler"),
  6. ("csv", "CSV"),
  7. ("html", "HTML"),
  8. )
  9. export_type = forms.ChoiceField(choices=EXPORT_TYPES)
  10. class ScrobbleForm(forms.Form):
  11. item_id = forms.CharField(
  12. label="",
  13. widget=forms.TextInput(
  14. attrs={
  15. "class": "form-control form-control-dark w-100",
  16. "placeholder": "Scrobble something (ttIMDB, -v Video Game title, -b Book title, -s TheSportsDB ID)",
  17. "aria-label": "Scrobble something",
  18. }
  19. ),
  20. )