remove extra logs

adam
root 2021-04-26 21:06:37 +00:00
parent 5662ca2d07
commit 3232e96b71
1 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ from django.views import generic
def insertBookToBookshelf(bookId, bookshelfId): def insertBookToBookshelf(bookId, bookshelfId):
existing = BookshelfToBook.objects.filter(fk_books=bookId, fk_bookshelves=bookshelfId) existing = BookshelfToBook.objects.filter(fk_books=bookId, fk_bookshelves=bookshelfId)
if existing.count() > 0: if existing.count() > 0:
print('attempted duplicate insert') # print('attempted duplicate insert')
return return
book = Book.objects.get(id=bookId) book = Book.objects.get(id=bookId)
bookshelf = Bookshelf.objects.get(id=bookshelfId) bookshelf = Bookshelf.objects.get(id=bookshelfId)
@ -166,7 +166,7 @@ def loginView(request):
# check whether it's valid: # check whether it's valid:
if form.get('username') != None and form.get('password') != None: if form.get('username') != None and form.get('password') != None:
user = authenticate(username=form.get('username'), password=form.get('password')) user = authenticate(username=form.get('username'), password=form.get('password'))
print(user) # print(user)
if user is not None: if user is not None:
# A backend authenticated the credentials # A backend authenticated the credentials
login(request, user) login(request, user)
@ -187,4 +187,4 @@ def loginView(request):
def logoutView(request): def logoutView(request):
logout(request) logout(request)
return redirect("/bookshelves") return redirect("/bookshelves")