Comments (15)
Django 1.8 >
TEMPLATE_LOADERS setting deprecated.
You have to use the TEMPLATES dictionary.
I think you're going to want something like:
settings.py
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "templates")],
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
'loaders':[
'admin_tools.template_loaders.Loader',
('django.template.loaders.cached.Loader', [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
]),
],
},
},
]
also note – django 1.8 moved from django.core.context_processors to django.template.context_processors
from django-admin-tools.
But have you correctly configured django-admin-tools ?
Since versions 0.7.x, you must add admin_tools.template_loaders.Loader
to your template loaders as stated in the release notes and in the documentation.
from django-admin-tools.
@sztankatt Got exactly the same issue when upgrading Django from 1.8.7 to 1.9.1
from django-admin-tools.
@Anton-Shutik Yeah, although I have Django 1.8.5. Also, to clarify, I am running it on ubuntu 14.04 locally.
from django-admin-tools.
@izimobil
That helped for me!
Thanks!
from django-admin-tools.
I'm having the same problem with Django 1.7 but followed the documentation. Django's also whining about admin_tools.template_loaders.TemplateLoader
even after I add it to TEMPLATE_LOADERS
:
urls.py
urlpatterns = patterns('',
url(r'^admin_tools/', include('admin_tools.urls')),
url(r'^admin/', include(admin.site.urls)),
...
)
settings.py
INSTALLED_APPS = (
'admin_tools',
'admin_tools.theming',
'admin_tools.menu',
'admin_tools.dashboard',
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.contenttypes',
...
)
TEMPLATES_LOADERS = (
"admin_tools.template_loaders.Loader",
)
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.request",
)
console
$ python manage.py migrate
...
$ python manage.py runserver
Performing system checks...
System check identified some issues:
WARNINGS:
admin_tools: (admin_tools.W001) You must add "admin_tools.template_loaders.TemplateLoader" in your template loaders variable, see: https://django-admin-tools.readthedocs.org/en/latest/configuration.html
System check identified 1 issue (0 silenced).
March 14, 2016 - 19:56:46
Django version 1.7.9, using settings '<redacted>.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
from django-admin-tools.
You have a typo in your template loaders variable... s/TEMPLATES_LOADERS/TEMPLATE_LOADERS/ . Also, you should put the default Django loaders in it.
from django-admin-tools.
Solved my problem. Fixed the variable name and included the Django loaders as @izimobil advised. Thanks!
from django-admin-tools.
This is already documented.
from django-admin-tools.
Only saw the call to the deprecated TEMPLATE_LOADERS variable. Pardon me for trying to help.
from django-admin-tools.
Sorry, I didn't meant to be rude :) thanks for your help, if you want to make a pull request on the documentation, you are welcome.
from django-admin-tools.
Perhaps I was a bit touchy. Apologies.
from django-admin-tools.
Thanks @arsenalstriker14 your config worked within django 2
from django-admin-tools.
Thanks @arsenalstriker14 your config worked within django 3.0
I was stuck actually.
from django-admin-tools.
Django 1.8 >
TEMPLATE_LOADERS setting deprecated.
You have to use the TEMPLATES dictionary.
I think you're going to want something like:settings.py
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, "templates")], 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], 'loaders':[ 'admin_tools.template_loaders.Loader', ('django.template.loaders.cached.Loader', [ 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ]), ], }, },
]
also note – django 1.8 moved from django.core.context_processors to django.template.context_processors
Really Helpful..................Thnx Its solve my issues!
from django-admin-tools.
Related Issues (20)
- JS dont add last column HOT 1
- conflict with django-constance app? HOT 4
- Jquery 1.9 considered insecure HOT 1
- Application labels aren't unique, duplicates: dashboard
- Cannot extend admin-tools blocks into templates
- Any thoughts having a UI to configure (show/hide) columns of a table for users according to permissions
- New release on pypi HOT 1
- Menu: Collapse sub-menus of apps with only one model
- Menu: Detect most important model per app
- Error while running the tests HOT 1
- Can User Administration would do CRUD operation through 3rd party REST api instead of DB data HOT 1
- Customizable sidebar
- [UI] compatible with Django Admin's Dark mode
- dont work in django 4.0.1 python 3.8 - unable to import dashboard.py HOT 1
- Error parsing template admin_tools/menu/dummy.html: Invalid template name in 'extends' tag: '' HOT 4
- Incompatibility between django-debug-toolbar and django-admin-tools HOT 1
- Add default theming support for Django's new dark mode HOT 1
- Usage with Django 4.x HOT 3
- Update `tox.ini` to match list of classifiers from `setup.py`
- ImportError: cannot import name 'render_to_response' Django 3.0 upgrade used pip HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-admin-tools.