Vylepšení seznamu aplikací v Adminu #51

Merged
zelvuska merged 2 commits from pojmenovane_aplikace into master 7 months ago
  1. 2
      aesop/apps.py
  2. 1
      api/apps.py
  3. 1
      header_fotky/apps.py
  4. 14
      mamweb/admin.py
  5. 1
      novinky/apps.py
  6. 1
      odevzdavatko/apps.py
  7. 1
      personalni/apps.py
  8. 7
      seminar/apps.py
  9. 1
      sifrovacka/apps.py
  10. 1
      soustredeni/apps.py
  11. 1
      treenode/apps.py
  12. 1
      various/apps.py
  13. 1
      vyroci/apps.py
  14. 1
      vysledkovky/apps.py

2
aesop/apps.py

@ -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'

1
api/apps.py

@ -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'

1
header_fotky/apps.py

@ -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í'

14
mamweb/admin.py

@ -42,8 +42,18 @@ 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',
]
# Odhlášený admin má prázdný app_dict :-/
app_list = [app_dict[label] for label in aplikace_nahore if label in app_dict] + [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:

1
novinky/apps.py

@ -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'

1
odevzdavatko/apps.py

@ -6,3 +6,4 @@ from django.apps import AppConfig
class OdevzdavatkoConfig(AppConfig): class OdevzdavatkoConfig(AppConfig):
name = 'odevzdavatko' name = 'odevzdavatko'
verbose_name = 'Odevzdávátko'

1
personalni/apps.py

@ -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

@ -0,0 +1,7 @@
from django.apps import AppConfig
class SeminarConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'seminar'
verbose_name = 'Seminář'

1
sifrovacka/apps.py

@ -3,3 +3,4 @@ from django.apps import AppConfig
class SifrovackaConfig(AppConfig): class SifrovackaConfig(AppConfig):
name = 'sifrovacka' name = 'sifrovacka'
verbose_name = 'Šifrovačka'

1
soustredeni/apps.py

@ -6,3 +6,4 @@ from django.apps import AppConfig
class SoustredeniConfig(AppConfig): class SoustredeniConfig(AppConfig):
name = 'soustredeni' name = 'soustredeni'
verbose_name = 'Soustředění'

1
treenode/apps.py

@ -6,3 +6,4 @@ from django.apps import AppConfig
class TreenodeConfig(AppConfig): class TreenodeConfig(AppConfig):
name = 'treenode' name = 'treenode'
verbose_name = 'TreeNody'

1
various/apps.py

@ -6,3 +6,4 @@ from django.apps import AppConfig
class VariousConfig(AppConfig): class VariousConfig(AppConfig):
name = 'various' name = 'various'
verbose_name = 'Různé'

1
vyroci/apps.py

@ -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'

1
vysledkovky/apps.py

@ -6,3 +6,4 @@ from django.apps import AppConfig
class VysledkovkyConfig(AppConfig): class VysledkovkyConfig(AppConfig):
name = 'vysledkovky' name = 'vysledkovky'
verbose_name = 'Výsledkovky'

Loading…
Cancel
Save