change field type

adam
Adam Undus 2021-05-07 14:57:50 -04:00 committed by GitHub
parent 17c48e3511
commit 39a3126b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ from django import forms
from .models import Book
class NewBookForm(forms.Form):
bookid = forms.CharField(label='Book ID', max_length=12)
bookid = forms.IntegerField(label='Book ID')
def is_valid():
return Book.objects.get(self.bookid) != None