Nepoužité importy
This commit is contained in:
parent
79f57c7762
commit
185418d19b
27 changed files with 20 additions and 58 deletions
|
@ -1,7 +1,6 @@
|
|||
from django.test import TestCase, tag
|
||||
from django.urls import reverse
|
||||
import seminar.models as m
|
||||
import seminar.views as v
|
||||
from seminar.utils import sync_skoly
|
||||
|
||||
@tag('stejny-model-na-produkci')
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
from galerie.models import Obrazek, Galerie
|
||||
from django.contrib import admin
|
||||
from django.http import HttpResponseRedirect
|
||||
from django import forms
|
||||
from django.db import models
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django import forms
|
||||
from seminar.models import Soustredeni
|
||||
|
||||
|
||||
class KomentarForm(forms.Form):
|
||||
komentar = forms.CharField(label = "Komentář:", max_length = 300, required=False)
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
import random
|
||||
|
||||
from django.http import HttpResponse, Http404
|
||||
from django.http import Http404
|
||||
from django.shortcuts import render, HttpResponseRedirect, get_object_or_404
|
||||
from django.template import RequestContext
|
||||
from datetime import datetime
|
||||
|
||||
from galerie.models import Obrazek, Galerie
|
||||
from seminar.models import Soustredeni
|
||||
|
|
|
@ -3,7 +3,7 @@ Context processory lze přidat do djanga v :mod:`~mamweb.settings` a dělají to
|
|||
že do contextu (tj. to, z čeho se např. berou proměnné v templatech) libovolné
|
||||
stránky přidají další věci.
|
||||
"""
|
||||
from datetime import datetime, date
|
||||
from datetime import datetime
|
||||
import random
|
||||
|
||||
from django.conf import settings
|
||||
|
|
|
@ -8,9 +8,6 @@ from django.db.models import Count,Q
|
|||
from .models import Oprava,Komentar,KorekturovanePDF, Organizator
|
||||
from .forms import OpravaForm
|
||||
|
||||
import subprocess
|
||||
import shutil
|
||||
import os
|
||||
|
||||
class KorekturyListView(generic.ListView):
|
||||
model = KorekturovanePDF
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import os.path
|
||||
|
||||
#
|
||||
# Lokalni / vyvojove nastaveni settings.py
|
||||
#
|
||||
|
@ -10,6 +8,8 @@ import os.path
|
|||
# Import common settings
|
||||
from .settings_common import *
|
||||
|
||||
import os.path
|
||||
|
||||
MIDDLEWARE += (
|
||||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import os.path
|
||||
|
||||
#
|
||||
# Produkcni nastaveni settings.py
|
||||
#
|
||||
|
@ -10,6 +8,8 @@ import os.path
|
|||
# Import common settings
|
||||
from .settings_common import *
|
||||
|
||||
import os
|
||||
|
||||
|
||||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
||||
|
||||
|
@ -45,8 +45,6 @@ DATABASES = {
|
|||
},
|
||||
}
|
||||
|
||||
import os
|
||||
|
||||
SERVER_EMAIL = 'mamweb-prod-errors@mam.mff.cuni.cz'
|
||||
ADMINS = [('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz')]
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import os.path
|
||||
|
||||
#
|
||||
# Testovaci nastaveni settings.py (testovani na atreyi)
|
||||
#
|
||||
|
@ -49,8 +47,6 @@ DATABASES = {
|
|||
},
|
||||
}
|
||||
|
||||
import os
|
||||
|
||||
SERVER_EMAIL = 'mamweb-test-errors@mam.mff.cuni.cz'
|
||||
ADMINS = [
|
||||
('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz'),
|
||||
|
|
|
@ -7,9 +7,8 @@ from django.contrib import admin
|
|||
from django.conf import settings
|
||||
from django.views.generic.base import TemplateView
|
||||
from django import views
|
||||
from django.urls import path # As per docs.
|
||||
|
||||
from treenode.routers import router
|
||||
# from treenode.routers import router
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from django.core.exceptions import PermissionDenied
|
||||
from django.views.generic import ListView, DetailView, FormView
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.core.mail import EmailMessage
|
||||
from django.utils import timezone
|
||||
|
@ -11,8 +10,6 @@ from django.urls import reverse
|
|||
from django.db import transaction
|
||||
from django.db.models import Q
|
||||
|
||||
from dataclasses import dataclass
|
||||
import datetime
|
||||
from decimal import Decimal
|
||||
from itertools import groupby
|
||||
import logging
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from django.shortcuts import render
|
||||
from django.urls import reverse
|
||||
from django.views import generic
|
||||
from django.db.models import Q, Count, Min
|
||||
from django.db.models import Q, Min
|
||||
from django.views.decorators.debug import sensitive_post_parameters
|
||||
from django.views.generic.base import TemplateView
|
||||
from django.contrib.auth.models import User, Permission, Group, AnonymousUser
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.shortcuts import render, get_object_or_404
|
|||
from django.views import generic
|
||||
from django.shortcuts import HttpResponseRedirect
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.db.models import Sum
|
||||
from django.forms import Form
|
||||
|
||||
from prednasky.models import Prednaska, Hlasovani, Seznam, STAV_NAVRH
|
||||
|
|
|
@ -3,7 +3,7 @@ from django.db import models
|
|||
from django.forms import widgets, ModelForm
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin, PolymorphicChildModelFilter
|
||||
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin
|
||||
from solo.admin import SingletonModelAdmin
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
from django.contrib.sessions.models import Session
|
||||
from django.contrib.auth.models import Group, Permission
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
from django.contrib.sessions.models import Session
|
||||
from django.contrib.auth.models import Group, Permission
|
||||
from django.contrib.auth.models import Group
|
||||
import json
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import datetime
|
||||
import os
|
||||
import random
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.core.management import call_command
|
||||
from django.conf import settings
|
||||
|
||||
from seminar.models import Skola, Resitel, Rocnik, Cislo, Problem, Reseni, PrilohaReseni, Nastaveni
|
||||
from seminar.models import Skola, Resitel, Rocnik, Cislo, Problem, Reseni
|
||||
from seminar.testutils import create_test_data
|
||||
import django.contrib.auth
|
||||
User = django.contrib.auth.get_user_model()
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import os
|
||||
from django.db import models
|
||||
|
||||
from .base import SeminarModelBase
|
||||
|
|
|
@ -10,15 +10,13 @@ from django.db import models
|
|||
from django.db.models import Q
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils import timezone
|
||||
from django.conf import settings
|
||||
from django.urls import reverse
|
||||
from django.core.cache import cache
|
||||
from django.core.exceptions import ObjectDoesNotExist, ValidationError
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.core.files.storage import FileSystemStorage
|
||||
from django.utils.text import get_valid_filename
|
||||
from django.utils.functional import cached_property
|
||||
|
||||
from solo.models import SingletonModel
|
||||
from taggit.managers import TaggableManager
|
||||
|
||||
from reversion import revisions as reversion
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from django import template
|
||||
from django.utils.safestring import mark_safe
|
||||
from datetime import datetime, timedelta
|
||||
from mamweb.settings import TIME_ZONE
|
||||
from datetime import datetime
|
||||
import logging
|
||||
register = template.Library()
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import unidecode
|
|||
import logging
|
||||
|
||||
from korektury.testutils import create_test_pdf
|
||||
from seminar.models import Skola, Resitel, Rocnik, Cislo, Deadline, Problem, Reseni, PrilohaReseni, Nastaveni, Soustredeni, Soustredeni_Ucastnici, Soustredeni_Organizatori, Osoba, Organizator, Prijemce, Tema, Uloha, Konfera, TextNode, UlohaVzorakNode, RocnikNode, CisloNode, TemaVCisleNode, Text, Hodnoceni, UlohaZadaniNode, Novinky, TreeNode
|
||||
from seminar.models import Skola, Resitel, Rocnik, Cislo, Deadline, Problem, Reseni, Nastaveni, Soustredeni, Soustredeni_Ucastnici, Soustredeni_Organizatori, Osoba, Organizator, Prijemce, Tema, Uloha, Konfera, TextNode, UlohaVzorakNode, RocnikNode, CisloNode, TemaVCisleNode, Text, Hodnoceni, UlohaZadaniNode, Novinky
|
||||
import seminar.models as m
|
||||
|
||||
from django.contrib.flatpages.models import FlatPage
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from django.urls import path, include, re_path
|
||||
from django.urls import path
|
||||
from . import views
|
||||
from .utils import org_required
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ from django.core.exceptions import ObjectDoesNotExist
|
|||
from django.views import generic
|
||||
from django.utils.translation import gettext as _
|
||||
from django.http import Http404
|
||||
from django.db.models import Q, Sum, Count
|
||||
from django.db.models import Q
|
||||
from django.views.generic.base import RedirectView
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.contrib.staticfiles.finders import find
|
||||
|
@ -17,24 +17,18 @@ from seminar.models import Problem, Cislo, Reseni, Nastaveni, Rocnik, \
|
|||
Deadline # Tohle je stare a chceme se toho zbavit. Pouzivejte s.ToCoChci
|
||||
#from .models import VysledkyZaCislo, VysledkyKCisluZaRocnik, VysledkyKCisluOdjakziva
|
||||
from seminar import utils
|
||||
from treenode import treelib
|
||||
import treenode.templatetags as tnltt
|
||||
import treenode.serializers as vr
|
||||
from vysledkovky.utils import body_resitelu, VysledkovkaCisla, \
|
||||
VysledkovkaRocniku, VysledkovkaDoTeXu
|
||||
|
||||
from datetime import date, datetime
|
||||
from django.utils import timezone
|
||||
from itertools import groupby
|
||||
from collections import OrderedDict
|
||||
import tempfile
|
||||
import subprocess
|
||||
import shutil
|
||||
import os
|
||||
import os.path as op
|
||||
from django.conf import settings
|
||||
import unicodedata
|
||||
import time
|
||||
from collections.abc import Sequence
|
||||
import http
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from django.shortcuts import get_object_or_404, render
|
||||
from django.http import HttpResponse
|
||||
from django.views import generic
|
||||
from django.conf import settings
|
||||
from django.contrib.staticfiles.finders import find
|
||||
from seminar.models import Soustredeni, Resitel, Soustredeni_Ucastnici, Nastaveni # Tohle je stare a chceme se toho zbavit. Pouzivejte s.ToCoChci
|
||||
import csv
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin, PolymorphicChildModelFilter
|
||||
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin
|
||||
|
||||
import seminar.models as m
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
from rest_framework import viewsets,filters
|
||||
from rest_framework import status
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import viewsets
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from rest_framework.permissions import BasePermission, AllowAny
|
||||
from rest_framework.permissions import AllowAny
|
||||
from seminar import models as m
|
||||
import treenode.serializers as views
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
from django.contrib import admin
|
Loading…
Reference in a new issue