Usměrnění importů import *
This commit is contained in:
parent
0c45d8051f
commit
1790c0faf7
13 changed files with 34 additions and 1 deletions
|
@ -13,6 +13,8 @@ from tvorba.models import Cislo, Deadline, Problem, Uloha, aux_generate_filename
|
|||
from personalni.models import Resitel
|
||||
from seminar.models.base import SeminarModelBase
|
||||
|
||||
__all__ = ["Reseni", "Hodnoceni", "PrilohaReseni", "Reseni_Resitele"]
|
||||
|
||||
|
||||
@reversion.register(ignore_duplicates=True)
|
||||
class Reseni(SeminarModelBase):
|
||||
|
|
|
@ -13,6 +13,8 @@ from reversion import revisions as reversion
|
|||
|
||||
from seminar.models.base import SeminarModelBase
|
||||
|
||||
__all__ = ["Osoba", "Skola", "Prijemce", "Organizator", "Resitel"]
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from django.urls import reverse
|
||||
from django.db import models
|
||||
|
||||
__all__ = ["SeminarModelBase"]
|
||||
|
||||
class SeminarModelBase(models.Model):
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ from solo.models import SingletonModel
|
|||
|
||||
from tvorba.models import Cislo
|
||||
|
||||
__all__ = ["Nastaveni"]
|
||||
|
||||
|
||||
@reversion.register(ignore_duplicates=True)
|
||||
class Nastaveni(SingletonModel):
|
||||
|
|
|
@ -6,6 +6,8 @@ from reversion import revisions as reversion
|
|||
|
||||
from personalni.models import Organizator
|
||||
|
||||
__all__ = ["Novinky"]
|
||||
|
||||
|
||||
@reversion.register(ignore_duplicates=True)
|
||||
class Novinky(models.Model):
|
||||
|
|
|
@ -6,6 +6,8 @@ from .base import SeminarModelBase
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__all__ = ["Text", "Obrazek"]
|
||||
|
||||
|
||||
class Text(SeminarModelBase):
|
||||
class Meta:
|
||||
|
|
|
@ -14,6 +14,11 @@ from tvorba.models import Rocnik, Problem, aux_generate_filename
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
"Soustredeni", "Soustredeni_Organizatori", "Soustredeni_Ucastnici",
|
||||
"Konfera", "Konfery_Ucastnici"
|
||||
]
|
||||
|
||||
|
||||
@reversion.register(ignore_duplicates=True)
|
||||
class Soustredeni(SeminarModelBase):
|
||||
|
|
|
@ -3,6 +3,7 @@ import datetime
|
|||
import lorem
|
||||
|
||||
from .models import *
|
||||
from tvorba.models import Rocnik
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -13,9 +13,16 @@ from personalni.models import Organizator
|
|||
|
||||
from seminar.models.pomocne import Text
|
||||
|
||||
from tvorba.models import Rocnik, Cislo, Tema, Uloha, Pohadka
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from tvorba.models import Rocnik, Cislo, Tema, Uloha, Pohadka
|
||||
__all__ = [
|
||||
"ReseniNode", "CastNode", "TextNode", "CisloNode", "PohadkaNode",
|
||||
"OrgTextNode", "MezicisloNode", "TreeNode", "RocnikNode", "UlohaVzorakNode",
|
||||
"UlohaZadaniNode", "TemaVCisleNode",
|
||||
]
|
||||
|
||||
|
||||
class TreeNode(PolymorphicModel):
|
||||
class Meta:
|
||||
|
|
|
@ -6,6 +6,7 @@ from rest_framework.permissions import BasePermission, AllowAny
|
|||
from .models import *
|
||||
from tvorba.models import Problem, Uloha
|
||||
from odevzdavatko.models import Reseni
|
||||
from seminar.models.pomocne import Text
|
||||
import treenode.serializers as views
|
||||
|
||||
from treenode.permissions import AllowWrite
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Todo: reversion
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.contrib import admin
|
||||
from django.forms import ModelForm
|
||||
from django.utils.safestring import mark_safe
|
||||
|
|
|
@ -39,6 +39,11 @@ from various.utils import roman
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
"Rocnik", "Cislo", "Deadline", "Problem", "Uloha", "Tema", "Clanek",
|
||||
"ZmrazenaVysledkovka", "Pohadka",
|
||||
]
|
||||
|
||||
class OverwriteStorage(FileSystemStorage):
|
||||
""" Varianta FileSystemStorage, která v případě, že soubor cílového
|
||||
jména již existuje, ho smaže a místo něj uloží soubor nový"""
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
__all__ = ["group_by_rocnik"]
|
||||
|
||||
|
||||
def group_by_rocnik(clanky):
|
||||
""" Vezme zadaný seznam článků a seskupí je podle ročníku.
|
||||
|
|
Loading…
Reference in a new issue