summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Scheibenpflug <zorchenhimer@gmail.com>2015-06-20 22:09:46 (GMT)
committerNick Scheibenpflug <zorchenhimer@gmail.com>2015-06-20 22:09:46 (GMT)
commitff566b3a8c0aa7228c5d9343ee9ea7d2cdd8226c (patch)
tree692c404ed8093695652ef3538545122a663a28dd
parentefb637c83f5a1dd4702b9a41801d305e9d1077fe (diff)
downloadmanga-reader-ff566b3a8c0aa7228c5d9343ee9ea7d2cdd8226c.zip
manga-reader-ff566b3a8c0aa7228c5d9343ee9ea7d2cdd8226c.tar.gz
Add a selection for adding the current orphan to an existing manga. Currently does nothing.
-rw-r--r--file_management/forms.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/file_management/forms.py b/file_management/forms.py
index dd9cd43..cf8a564 100644
--- a/file_management/forms.py
+++ b/file_management/forms.py
@@ -1,4 +1,12 @@
1from django import forms 1from django import forms
2from file_management.models import Manga
3
4def get_choices():
5 ## This will get unwieldy after a couple dozen series are added. Maybe
6 ## only list up to the Nth last added?
7 choices = [('', '-- None --')]
8 [choices.append((m.system_name, m.full_name)) for m in Manga.objects.all()]
9 return choices
2 10
3class UploadPackedManga(forms.Form): 11class UploadPackedManga(forms.Form):
4 packed_file = forms.FileField(label='File to upload') 12 packed_file = forms.FileField(label='File to upload')
@@ -9,3 +17,7 @@ class EditOrphanedManga(forms.Form):
9 manga_name = forms.CharField(max_length=120) 17 manga_name = forms.CharField(max_length=120)
10 system_name = forms.CharField(max_length=120) 18 system_name = forms.CharField(max_length=120)
11 oneshot = forms.BooleanField(label="Oneshot", initial=False, required=False) 19 oneshot = forms.BooleanField(label="Oneshot", initial=False, required=False)
20
21 current_manga = forms.ChoiceField(label="Existing Manga",
22 choices=get_choices())
23