From 8e1e30e672b27001d09841fb76494e860e4b90ce Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Thu, 21 May 2015 22:17:46 +0200 Subject: [PATCH] Priprava autocomplete tagu a pod., vzhled adminu --- mamweb/settings_common.py | 25 ++++++++++++++++--------- requirements.txt | 3 ++- seminar/autocomplete_light_registry.py | 4 ++++ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index c842bfc2..6214ce41 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -49,9 +49,11 @@ AUTHENTICATION_BACKENDS = ( ) TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - 'django.template.loaders.eggs.Loader' + ('django.template.loaders.cached.Loader', ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + 'django.template.loaders.eggs.Loader' + )), ) MIDDLEWARE_CLASSES = ( @@ -95,17 +97,22 @@ INSTALLED_APPS = ( 'solo', 'ckeditor', 'taggit', + 'autocomplete_light', # MaMweb 'mamweb', 'seminar', - # Prvni: - 'autocomplete_light', - 'admin_tools', - 'admin_tools.theming', - 'admin_tools.menu', - 'admin_tools.dashboard', + # Admin upravy: + +# 'material', +# 'material.admin', +# 'admin_tools', +# 'admin_tools.theming', +# 'admin_tools.menu', +# 'admin_tools.dashboard', + 'flat', + 'django.contrib.admin', ) diff --git a/requirements.txt b/requirements.txt index 5e7cba79..6e398b41 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,9 +17,10 @@ django-sekizai==0.8.1 django-countries==3.2 django-solo==1.1.0 django-ckeditor==4.4.7 -django-admin-tools==0.5.2 +django-flat-theme==0.9.3 django-taggit==0.14.0 django-autocomplete-light==2.1.1 +# django-admin-tools==0.5.2 # debug tools/extensions diff --git a/seminar/autocomplete_light_registry.py b/seminar/autocomplete_light_registry.py index c7de8983..0b40dbcf 100644 --- a/seminar/autocomplete_light_registry.py +++ b/seminar/autocomplete_light_registry.py @@ -3,6 +3,10 @@ import autocomplete_light from models import Skola, Resitel, Problem +from taggit.models import Tag + + +autocomplete_light.register(Tag) class SkolaAutocomplete(autocomplete_light.AutocompleteModelBase):