You can now upload .opml files

This commit is contained in:
Joakim Hellsén 2024-01-31 04:33:43 +01:00
commit 2c60f0aab7
7 changed files with 417 additions and 201 deletions

19
feeds/forms.py Normal file
View file

@ -0,0 +1,19 @@
"""https://docs.djangoproject.com/en/5.0/topics/forms/."""
from __future__ import annotations
from django import forms
class UploadOPMLForm(forms.Form):
"""Upload OPML.
Args:
forms: A collection of Fields, plus their associated data.
"""
file = forms.FileField(
label="Select an OPML file",
help_text="max. 100 megabytes",
widget=forms.FileInput(attrs={"accept": ".opml"}),
)