|
|
@@ -10,10 +10,28 @@ CHOICES = (
|
|
|
('1', 'depth = 1 (archive these URLs and all URLs one hop away)'),
|
|
|
)
|
|
|
|
|
|
+ARCHIVE_METHODS = [
|
|
|
+ ('title', 'title'),
|
|
|
+ ('favicon', 'favicon'),
|
|
|
+ ('wget', 'wget'),
|
|
|
+ ('warc', 'warc'),
|
|
|
+ ('pdf', 'pdf'),
|
|
|
+ ('screenshot', 'screenshot'),
|
|
|
+ ('dom', 'dom'),
|
|
|
+ ('singlefile', 'singlefile'),
|
|
|
+ ('git', 'git'),
|
|
|
+ ('media', 'media'),
|
|
|
+ ('archive_org', 'archive_org'),
|
|
|
+]
|
|
|
+
|
|
|
+
|
|
|
class AddLinkForm(forms.Form):
|
|
|
url = forms.RegexField(label="URLs (one per line)", regex=URL_REGEX, min_length='6', strip=True, widget=forms.Textarea, required=True)
|
|
|
depth = forms.ChoiceField(label="Archive depth", choices=CHOICES, widget=forms.RadioSelect, initial='0')
|
|
|
-
|
|
|
+ archiveMethods = forms.MultipleChoiceField(
|
|
|
+ required=False,
|
|
|
+ widget=forms.SelectMultiple,
|
|
|
+ choices=ARCHIVE_METHODS,)
|
|
|
|
|
|
class TagWidgetMixin:
|
|
|
def format_value(self, value):
|