From 2a8c89a1a6e39854b0e9d341db578215496b346c Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 16 Aug 2021 14:54:06 +0200 Subject: remove unused import and variables --- accounts/admin.py | 2 +- accounts/models.py | 2 +- accounts/views.py | 11 ++--------- 3 files changed, 4 insertions(+), 11 deletions(-) (limited to 'accounts') diff --git a/accounts/admin.py b/accounts/admin.py index 8c38f3f..5538909 100644 --- a/accounts/admin.py +++ b/accounts/admin.py @@ -1,3 +1,3 @@ -from django.contrib import admin +#from django.contrib import admin # Register your models here. diff --git a/accounts/models.py b/accounts/models.py index 71a8362..54f60fe 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -1,3 +1,3 @@ -from django.db import models +#from django.db import models # Create your models here. diff --git a/accounts/views.py b/accounts/views.py index c42bc52..7038ccd 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -1,16 +1,10 @@ from django.shortcuts import render from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import login, authenticate -from django.views import generic -from django.contrib.auth.models import Group -from django.core.files.storage import FileSystemStorage from django.http import FileResponse from django.contrib.auth.decorators import login_required from django.views.decorators.debug import sensitive_variables from django.http import HttpResponseRedirect -from django import forms -from django.contrib.auth.models import User -from django.core.exceptions import ValidationError from client.models import UserCode @@ -18,9 +12,8 @@ import dateparser import os from io import BytesIO from PIL import Image, UnidentifiedImageError -from pdf2image import convert_from_path, convert_from_bytes +from pdf2image import convert_from_bytes from pdf2image.exceptions import ( - PDFInfoNotInstalledError, PDFPageCountError, PDFSyntaxError ) @@ -28,7 +21,7 @@ from pdf2image.exceptions import ( # override to remove help text class RegisterForm(UserCreationForm): def __init__(self, *args, **kwargs): - super(UserCreationForm, self).__init__(*args, **kwargs) + super(RegisterForm, self).__init__(*args, **kwargs) for fieldname in ['username', 'password1', 'password2']: self.fields[fieldname].help_text = None -- cgit v1.2.1