Browse Source

Nepoužité importy

vycisteni
Jonas Havelka 4 months ago
parent
commit
185418d19b
  1. 1
      api/tests/test_skola_autocomplete.py
  2. 1
      galerie/admin.py
  3. 2
      galerie/forms.py
  4. 6
      galerie/views.py
  5. 2
      header_fotky/context_processors.py
  6. 3
      korektury/views.py
  7. 4
      mamweb/settings_local.py
  8. 6
      mamweb/settings_prod.py
  9. 4
      mamweb/settings_test.py
  10. 3
      mamweb/urls.py
  11. 3
      odevzdavatko/views.py
  12. 2
      personalni/views.py
  13. 1
      prednasky/views.py
  14. 2
      seminar/admin.py
  15. 1
      seminar/management/commands/load_org_permissions.py
  16. 3
      seminar/management/commands/save_org_permissions.py
  17. 4
      seminar/management/commands/testdata.py
  18. 1
      seminar/models/pomocne.py
  19. 4
      seminar/models/tvorba.py
  20. 3
      seminar/templatetags/utils.py
  21. 2
      seminar/testutils.py
  22. 2
      seminar/urls.py
  23. 8
      seminar/views/views_all.py
  24. 1
      soustredeni/views.py
  25. 2
      treenode/admin.py
  26. 6
      treenode/viewsets.py
  27. 1
      various/admin.py

1
api/tests/test_skola_autocomplete.py

@ -1,7 +1,6 @@
from django.test import TestCase, tag from django.test import TestCase, tag
from django.urls import reverse from django.urls import reverse
import seminar.models as m import seminar.models as m
import seminar.views as v
from seminar.utils import sync_skoly from seminar.utils import sync_skoly
@tag('stejny-model-na-produkci') @tag('stejny-model-na-produkci')

1
galerie/admin.py

@ -1,6 +1,5 @@
from galerie.models import Obrazek, Galerie from galerie.models import Obrazek, Galerie
from django.contrib import admin from django.contrib import admin
from django.http import HttpResponseRedirect
from django import forms from django import forms
from django.db import models from django.db import models

2
galerie/forms.py

@ -1,5 +1,5 @@
from django import forms from django import forms
from seminar.models import Soustredeni
class KomentarForm(forms.Form): class KomentarForm(forms.Form):
komentar = forms.CharField(label = "Komentář:", max_length = 300, required=False) komentar = forms.CharField(label = "Komentář:", max_length = 300, required=False)

6
galerie/views.py

@ -1,9 +1,5 @@
import random from django.http import Http404
from django.http import HttpResponse, Http404
from django.shortcuts import render, HttpResponseRedirect, get_object_or_404 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 galerie.models import Obrazek, Galerie
from seminar.models import Soustredeni from seminar.models import Soustredeni

2
header_fotky/context_processors.py

@ -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é že do contextu (tj. to, z čeho se např. berou proměnné v templatech) libovolné
stránky přidají další věci. stránky přidají další věci.
""" """
from datetime import datetime, date from datetime import datetime
import random import random
from django.conf import settings from django.conf import settings

3
korektury/views.py

@ -8,9 +8,6 @@ from django.db.models import Count,Q
from .models import Oprava,Komentar,KorekturovanePDF, Organizator from .models import Oprava,Komentar,KorekturovanePDF, Organizator
from .forms import OpravaForm from .forms import OpravaForm
import subprocess
import shutil
import os
class KorekturyListView(generic.ListView): class KorekturyListView(generic.ListView):
model = KorekturovanePDF model = KorekturovanePDF

4
mamweb/settings_local.py

@ -1,5 +1,3 @@
import os.path
# #
# Lokalni / vyvojove nastaveni settings.py # Lokalni / vyvojove nastaveni settings.py
# #
@ -10,6 +8,8 @@ import os.path
# Import common settings # Import common settings
from .settings_common import * from .settings_common import *
import os.path
MIDDLEWARE += ( MIDDLEWARE += (
'debug_toolbar.middleware.DebugToolbarMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware',
) )

6
mamweb/settings_prod.py

@ -1,5 +1,3 @@
import os.path
# #
# Produkcni nastaveni settings.py # Produkcni nastaveni settings.py
# #
@ -10,6 +8,8 @@ import os.path
# Import common settings # Import common settings
from .settings_common import * from .settings_common import *
import os
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ # 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' SERVER_EMAIL = 'mamweb-prod-errors@mam.mff.cuni.cz'
ADMINS = [('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz')] ADMINS = [('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz')]

4
mamweb/settings_test.py

@ -1,5 +1,3 @@
import os.path
# #
# Testovaci nastaveni settings.py (testovani na atreyi) # Testovaci nastaveni settings.py (testovani na atreyi)
# #
@ -49,8 +47,6 @@ DATABASES = {
}, },
} }
import os
SERVER_EMAIL = 'mamweb-test-errors@mam.mff.cuni.cz' SERVER_EMAIL = 'mamweb-test-errors@mam.mff.cuni.cz'
ADMINS = [ ADMINS = [
('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz'), ('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz'),

3
mamweb/urls.py

@ -7,9 +7,8 @@ from django.contrib import admin
from django.conf import settings from django.conf import settings
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from django import views from django import views
from django.urls import path # As per docs.
from treenode.routers import router # from treenode.routers import router
urlpatterns = [ urlpatterns = [

3
odevzdavatko/views.py

@ -1,5 +1,4 @@
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django.views.generic import ListView, DetailView, FormView
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.mixins import LoginRequiredMixin
from django.core.mail import EmailMessage from django.core.mail import EmailMessage
from django.utils import timezone from django.utils import timezone
@ -11,8 +10,6 @@ from django.urls import reverse
from django.db import transaction from django.db import transaction
from django.db.models import Q from django.db.models import Q
from dataclasses import dataclass
import datetime
from decimal import Decimal from decimal import Decimal
from itertools import groupby from itertools import groupby
import logging import logging

2
personalni/views.py

@ -1,7 +1,7 @@
from django.shortcuts import render from django.shortcuts import render
from django.urls import reverse from django.urls import reverse
from django.views import generic 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.decorators.debug import sensitive_post_parameters
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from django.contrib.auth.models import User, Permission, Group, AnonymousUser from django.contrib.auth.models import User, Permission, Group, AnonymousUser

1
prednasky/views.py

@ -2,7 +2,6 @@ from django.shortcuts import render, get_object_or_404
from django.views import generic from django.views import generic
from django.shortcuts import HttpResponseRedirect from django.shortcuts import HttpResponseRedirect
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Sum
from django.forms import Form from django.forms import Form
from prednasky.models import Prednaska, Hlasovani, Seznam, STAV_NAVRH from prednasky.models import Prednaska, Hlasovani, Seznam, STAV_NAVRH

2
seminar/admin.py

@ -3,7 +3,7 @@ from django.db import models
from django.forms import widgets, ModelForm from django.forms import widgets, ModelForm
from django.core.exceptions import ValidationError 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 solo.admin import SingletonModelAdmin
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe

1
seminar/management/commands/load_org_permissions.py

@ -1,5 +1,4 @@
from django.core.management.base import BaseCommand 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, Permission
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist

3
seminar/management/commands/save_org_permissions.py

@ -1,6 +1,5 @@
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.contrib.sessions.models import Session from django.contrib.auth.models import Group
from django.contrib.auth.models import Group, Permission
import json import json
class Command(BaseCommand): class Command(BaseCommand):

4
seminar/management/commands/testdata.py

@ -1,12 +1,10 @@
import datetime
import os import os
import random
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.core.management import call_command from django.core.management import call_command
from django.conf import settings 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 from seminar.testutils import create_test_data
import django.contrib.auth import django.contrib.auth
User = django.contrib.auth.get_user_model() User = django.contrib.auth.get_user_model()

1
seminar/models/pomocne.py

@ -1,4 +1,3 @@
import os
from django.db import models from django.db import models
from .base import SeminarModelBase from .base import SeminarModelBase

4
seminar/models/tvorba.py

@ -10,15 +10,13 @@ from django.db import models
from django.db.models import Q from django.db.models import Q
from django.template.loader import render_to_string from django.template.loader import render_to_string
from django.utils import timezone from django.utils import timezone
from django.conf import settings
from django.urls import reverse from django.urls import reverse
from django.core.cache import cache 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.core.files.storage import FileSystemStorage
from django.utils.text import get_valid_filename from django.utils.text import get_valid_filename
from django.utils.functional import cached_property from django.utils.functional import cached_property
from solo.models import SingletonModel
from taggit.managers import TaggableManager from taggit.managers import TaggableManager
from reversion import revisions as reversion from reversion import revisions as reversion

3
seminar/templatetags/utils.py

@ -1,7 +1,6 @@
from django import template from django import template
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from datetime import datetime, timedelta from datetime import datetime
from mamweb.settings import TIME_ZONE
import logging import logging
register = template.Library() register = template.Library()

2
seminar/testutils.py

@ -10,7 +10,7 @@ import unidecode
import logging import logging
from korektury.testutils import create_test_pdf 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 import seminar.models as m
from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.models import FlatPage

2
seminar/urls.py

@ -1,4 +1,4 @@
from django.urls import path, include, re_path from django.urls import path
from . import views from . import views
from .utils import org_required from .utils import org_required

8
seminar/views/views_all.py

@ -5,7 +5,7 @@ from django.core.exceptions import ObjectDoesNotExist
from django.views import generic from django.views import generic
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.http import Http404 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.views.generic.base import RedirectView
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django.contrib.staticfiles.finders import find 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 Deadline # Tohle je stare a chceme se toho zbavit. Pouzivejte s.ToCoChci
#from .models import VysledkyZaCislo, VysledkyKCisluZaRocnik, VysledkyKCisluOdjakziva #from .models import VysledkyZaCislo, VysledkyKCisluZaRocnik, VysledkyKCisluOdjakziva
from seminar import utils 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, \ from vysledkovky.utils import body_resitelu, VysledkovkaCisla, \
VysledkovkaRocniku, VysledkovkaDoTeXu VysledkovkaRocniku, VysledkovkaDoTeXu
from datetime import date, datetime
from django.utils import timezone from django.utils import timezone
from itertools import groupby from itertools import groupby
from collections import OrderedDict from collections import OrderedDict
import tempfile import tempfile
import subprocess import subprocess
import shutil import shutil
import os
import os.path as op import os.path as op
from django.conf import settings from django.conf import settings
import unicodedata import unicodedata
import time
from collections.abc import Sequence from collections.abc import Sequence
import http import http

1
soustredeni/views.py

@ -1,7 +1,6 @@
from django.shortcuts import get_object_or_404, render from django.shortcuts import get_object_or_404, render
from django.http import HttpResponse from django.http import HttpResponse
from django.views import generic from django.views import generic
from django.conf import settings
from django.contrib.staticfiles.finders import find 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 from seminar.models import Soustredeni, Resitel, Soustredeni_Ucastnici, Nastaveni # Tohle je stare a chceme se toho zbavit. Pouzivejte s.ToCoChci
import csv import csv

2
treenode/admin.py

@ -1,6 +1,6 @@
from django.contrib import admin from django.contrib import admin
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin, PolymorphicChildModelFilter from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin
import seminar.models as m import seminar.models as m

6
treenode/viewsets.py

@ -1,8 +1,6 @@
from rest_framework import viewsets,filters from rest_framework import viewsets
from rest_framework import status
from rest_framework.response import Response
from django.core.exceptions import PermissionDenied 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 from seminar import models as m
import treenode.serializers as views import treenode.serializers as views

1
various/admin.py

@ -1 +0,0 @@
from django.contrib import admin
Loading…
Cancel
Save