Remove unused imports #26

Closed
mpepin wants to merge 1 commit from kerl/unused_imports into master
11 changed files with 97 additions and 104 deletions

View file

@ -2,12 +2,12 @@
from tastypie.resources import ModelResource from tastypie.resources import ModelResource
from tastypie.authentication import SessionAuthentication from tastypie.authentication import SessionAuthentication
from tastypie import fields, utils from tastypie import fields
from django.contrib.gis import geos from django.contrib.gis import geos
from django.urls import reverse from django.urls import reverse
from .models import Lieu, Stage, Normalien, StageMatiere from .models import Lieu, Stage, Normalien
from .utils import approximate_distance from .utils import approximate_distance
class EnScolariteAuthentication(SessionAuthentication): class EnScolariteAuthentication(SessionAuthentication):

View file

@ -1,7 +1,7 @@
from django_elasticsearch_dsl import DocType, Index, fields from django_elasticsearch_dsl import DocType, Index, fields
from elasticsearch_dsl import analyzer, token_filter, tokenizer from elasticsearch_dsl import analyzer, token_filter
from .models import Stage, AvisStage, AvisLieu from .models import Stage
from .statics import PAYS_OPTIONS from .statics import PAYS_OPTIONS
PAYS_DICT = dict(PAYS_OPTIONS) PAYS_DICT = dict(PAYS_OPTIONS)

View file

@ -5,7 +5,7 @@ from django.utils import timezone
import re import re
from .models import Normalien, Stage, Lieu, AvisLieu, AvisStage from .models import Stage, Lieu, AvisLieu, AvisStage
from .widgets import LatLonField from .widgets import LatLonField
# Sur-classe utile # Sur-classe utile
@ -106,4 +106,3 @@ class LieuForm(forms.ModelForm):
class FeedbackForm(forms.Form): class FeedbackForm(forms.Form):
objet = forms.CharField(label="Objet", required=True) objet = forms.CharField(label="Objet", required=True)
message = forms.CharField(label="Message", required=True, widget=forms.widgets.Textarea()) message = forms.CharField(label="Message", required=True, widget=forms.widgets.Textarea())

View file

@ -1,7 +1,7 @@
#coding: utf-8 #coding: utf-8
from django.core.management.base import BaseCommand, CommandError
from django.db.models import Count from django.core.management.base import BaseCommand
from avisstage.models import Stage, Lieu from avisstage.models import Lieu
class Command(BaseCommand): class Command(BaseCommand):
help = 'Nettoie les stages à plusieurs lieux identiques' help = 'Nettoie les stages à plusieurs lieux identiques'

View file

@ -1,7 +1,8 @@
#coding: utf-8 #coding: utf-8
from django.core.management.base import BaseCommand, CommandError
from django.core.management.base import BaseCommand
from django.db.models import Count from django.db.models import Count
from avisstage.models import Stage, Lieu from avisstage.models import Stage
class Command(BaseCommand): class Command(BaseCommand):
help = 'Nettoie les stages à plusieurs lieux identiques' help = 'Nettoie les stages à plusieurs lieux identiques'

View file

@ -1,7 +1,7 @@
#coding: utf-8 #coding: utf-8
from django.core.management.base import BaseCommand, CommandError
from django.db.models import Count from django.core.management.base import BaseCommand
from avisstage.models import Stage, Lieu from avisstage.models import Lieu
class Command(BaseCommand): class Command(BaseCommand):
help = 'Nettoie les stages à plusieurs lieux identiques' help = 'Nettoie les stages à plusieurs lieux identiques'

View file

@ -9,13 +9,10 @@ from django.db import models
from django.db.models.signals import post_save from django.db.models.signals import post_save
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.contrib.gis.db import models as geomodels from django.contrib.gis.db import models as geomodels
from django.template.defaultfilters import slugify
from django.forms.widgets import DateInput
from django.urls import reverse from django.urls import reverse
from django.utils import timezone from django.utils import timezone
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.html import strip_tags
from taggit_autosuggest.managers import TaggableManager from taggit_autosuggest.managers import TaggableManager
from tinymce.models import HTMLField as RichTextField from tinymce.models import HTMLField as RichTextField
@ -23,8 +20,6 @@ from tinymce.models import HTMLField as RichTextField
from .utils import choices_length from .utils import choices_length
from .statics import DEPARTEMENTS_DEFAUT, PAYS_OPTIONS, TYPE_LIEU_OPTIONS, TYPE_STAGE_OPTIONS, TYPE_LIEU_DICT, TYPE_STAGE_DICT, NIVEAU_SCOL_OPTIONS, NIVEAU_SCOL_DICT from .statics import DEPARTEMENTS_DEFAUT, PAYS_OPTIONS, TYPE_LIEU_OPTIONS, TYPE_STAGE_OPTIONS, TYPE_LIEU_DICT, TYPE_STAGE_DICT, NIVEAU_SCOL_OPTIONS, NIVEAU_SCOL_DICT
import ldap
# #
# Profil Normalien (extension du modèle User) # Profil Normalien (extension du modèle User)
# #

View file

@ -4,11 +4,10 @@ from allauth_ens.adapter import deprecate_clippers
from datetime import date from datetime import date
from django.test import TestCase
from django.urls import reverse from django.urls import reverse
from django.conf import settings from django.conf import settings
from .models import User, Normalien, Lieu, Stage, StageMatiere, AvisLieu from .models import User, Lieu, Stage, StageMatiere, AvisLieu
class ExperiENSTestCase(CASTestCase): class ExperiENSTestCase(CASTestCase):

View file

@ -1,6 +1,5 @@
# coding: utf-8 # coding: utf-8
from allauth.socialaccount.models import SocialAccount
from functools import reduce from functools import reduce
from math import cos, radians, sqrt from math import cos, radians, sqrt

View file

@ -2,7 +2,7 @@
from django.shortcuts import render, redirect, get_object_or_404 from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic import DetailView, ListView from django.views.generic import DetailView
from django.views.generic.edit import UpdateView, CreateView from django.views.generic.edit import UpdateView, CreateView
from django import forms from django import forms
from django.urls import reverse from django.urls import reverse

View file

@ -9,7 +9,7 @@ from django.core.cache import cache
from django.core.paginator import Paginator from django.core.paginator import Paginator
from django.db.models import Q, Case, When from django.db.models import Q, Case, When
from django.http import JsonResponse, HttpResponseBadRequest from django.http import JsonResponse, HttpResponseBadRequest
from django.shortcuts import render, redirect, get_object_or_404 from django.shortcuts import render
import json import json
import logging import logging