Hezká jména a pořadí aplikací
This commit is contained in:
parent
15b09c23a7
commit
381c5ca3de
14 changed files with 30 additions and 3 deletions
|
@ -3,6 +3,6 @@ Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace.
|
||||||
"""
|
"""
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class AesopConfig(AppConfig):
|
class AesopConfig(AppConfig):
|
||||||
name = 'aesop'
|
name = 'aesop'
|
||||||
|
verbose_name = 'Export do AESOPa'
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class ApiConfig(AppConfig):
|
class ApiConfig(AppConfig):
|
||||||
name = 'api'
|
name = 'api'
|
||||||
|
verbose_name = 'Různá webová API'
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class HeaderFotkyConfig(AppConfig):
|
class HeaderFotkyConfig(AppConfig):
|
||||||
name = 'header_fotky'
|
name = 'header_fotky'
|
||||||
|
verbose_name = 'Fotky v záhlaví'
|
||||||
|
|
|
@ -42,8 +42,17 @@ def get_app_list(self, request, app_label=None):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
app_dict = self._build_app_dict(request, label=app_label)
|
app_dict = self._build_app_dict(request, label=app_label)
|
||||||
# Sort the apps alphabetically.
|
aplikace_nahore = [
|
||||||
app_list = sorted(app_dict.values(), key=lambda x: locale.strxfrm('!') if (x['name'] == "Seminar") else locale.strxfrm(x['name'].lower()))
|
'seminar',
|
||||||
|
'personalni',
|
||||||
|
'novinky',
|
||||||
|
'korektury',
|
||||||
|
'various',
|
||||||
|
'prednasky',
|
||||||
|
'soustredeni',
|
||||||
|
]
|
||||||
|
app_list = [app_dict[label] for label in aplikace_nahore] + [app_dict[label] for label in app_dict if label not in aplikace_nahore]
|
||||||
|
|
||||||
|
|
||||||
# Sort the models alphabetically within each app.
|
# Sort the models alphabetically within each app.
|
||||||
for app in app_list:
|
for app in app_list:
|
||||||
|
|
|
@ -3,3 +3,4 @@ from django.apps import AppConfig
|
||||||
class NovinkyConfig(AppConfig):
|
class NovinkyConfig(AppConfig):
|
||||||
default_auto_field = 'django.db.models.BigAutoField'
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
name = 'novinky'
|
name = 'novinky'
|
||||||
|
verbose_name = 'Novinky'
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class OdevzdavatkoConfig(AppConfig):
|
class OdevzdavatkoConfig(AppConfig):
|
||||||
name = 'odevzdavatko'
|
name = 'odevzdavatko'
|
||||||
|
verbose_name = 'Odevzdávátko'
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class PersonalniConfig(AppConfig):
|
class PersonalniConfig(AppConfig):
|
||||||
name = 'personalni'
|
name = 'personalni'
|
||||||
|
verbose_name = 'Personální' # Má to nějaký použitelnější název?
|
||||||
|
|
7
seminar/apps.py
Normal file
7
seminar/apps.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
class SeminarConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'seminar'
|
||||||
|
verbose_name = 'Seminář'
|
||||||
|
|
|
@ -3,3 +3,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class SifrovackaConfig(AppConfig):
|
class SifrovackaConfig(AppConfig):
|
||||||
name = 'sifrovacka'
|
name = 'sifrovacka'
|
||||||
|
verbose_name = 'Šifrovačka'
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class SoustredeniConfig(AppConfig):
|
class SoustredeniConfig(AppConfig):
|
||||||
name = 'soustredeni'
|
name = 'soustredeni'
|
||||||
|
verbose_name = 'Soustředění'
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class TreenodeConfig(AppConfig):
|
class TreenodeConfig(AppConfig):
|
||||||
name = 'treenode'
|
name = 'treenode'
|
||||||
|
verbose_name = 'TreeNody'
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class VariousConfig(AppConfig):
|
class VariousConfig(AppConfig):
|
||||||
name = 'various'
|
name = 'various'
|
||||||
|
verbose_name = 'Různé'
|
||||||
|
|
|
@ -3,3 +3,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class VyrociConfig(AppConfig):
|
class VyrociConfig(AppConfig):
|
||||||
name = 'vyroci'
|
name = 'vyroci'
|
||||||
|
verbose_name = '30. výročí M&M'
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
class VysledkovkyConfig(AppConfig):
|
class VysledkovkyConfig(AppConfig):
|
||||||
name = 'vysledkovky'
|
name = 'vysledkovky'
|
||||||
|
verbose_name = 'Výsledkovky'
|
||||||
|
|
Loading…
Reference in a new issue