UI for editable readthroughs

This commit is contained in:
Mouse Reeve
2020-10-29 22:38:01 -07:00
parent f35ed0e555
commit 5641c36539
3 changed files with 62 additions and 6 deletions

View File

@ -29,6 +29,7 @@ class CustomForm(ModelForm):
visible.field.widget.attrs['rows'] = None
visible.field.widget.attrs['class'] = css_classes[input_type]
class LoginForm(CustomForm):
class Meta:
model = models.User
@ -158,3 +159,9 @@ class CreateInviteForm(CustomForm):
choices=[(i, "%d uses" % (i,)) for i in [1, 5, 10, 25, 50, 100]]
+ [(None, 'Unlimited')])
}
class ReadThroughForm(CustomForm):
class Meta:
model = models.ReadThrough
fields = ['user', 'book', 'start_date', 'finish_date']