diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 5b7b257b..3f9edab6 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -348,4 +348,5 @@ class InvalidTemplateVariable(str): return '' TEMPLATES[0]['OPTIONS']['string_if_invalid'] = InvalidTemplateVariable('%s') - +# Django 3.2 vyžaduje explicitní nastavení autoklíče, zatím nechápu proč +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' diff --git a/prednasky/admin.py b/prednasky/admin.py index 2688fffc..c9807b27 100644 --- a/prednasky/admin.py +++ b/prednasky/admin.py @@ -52,7 +52,7 @@ class Seznam_PrednaskaInline(admin.TabularInline): ] exclude = ['prednaska'] - def has_add_permission(self, req): return False + def has_add_permission(self, req, obj): return False class SeznamAdmin(VersionAdmin): diff --git a/requirements.txt b/requirements.txt index 796e9f97..c447090d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -c constraints.txt # basic libs -psycopg2<2.9 # Kvůli djangu 2.2, odstranit při přechodu na 3. +psycopg2 html5lib ipython Pillow @@ -13,7 +13,7 @@ Unidecode # Django and modules -Django<2.3 +Django<3.3 #django-bootstrap-sass django-mptt django-reversion @@ -34,14 +34,14 @@ django-webpack-loader django-rest-polymorphic # Comments -django-contrib-comments==1.9.0 +django-contrib-comments # debug tools/extensions -django-debug-toolbar==1.11 -django-extensions==2.1.9 -sqlparse==0.2.4 -Werkzeug==0.14.1 +django-debug-toolbar +django-extensions +sqlparse +Werkzeug # G+, FB authorisation @@ -52,7 +52,7 @@ requests # requests-oauthlib # uWSGI -uWSGI==2.0.17.1 +uWSGI # Potřeba pro test data