Open A4TIF opened 6 years ago
Code look well.
Maybe you also need to update this template_name_base = "cruds" template_father = "cruds/base.html"
If you give error again, please paste part of the error here.
Using template_father in InlinAjaxCRUD shows the whole page base template again within the page, that messed up everything.
Basically, as per docs, if I use template overrides like templates/
Then it wont work.
But using CRUDView I can easily override the templates as above structure. The issue is with InlineAjaxCRUD only, where the overrides dont work.
If I add template_name_base = "cruds/ajax" .. it wont look for my overrides, it will only for template files within site-packages/cruds_adminlte/templates/..
So the issue is with basically the template overrides.
In settings, I use this:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, 'templates')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
...
...
...
Ok nevermind, looks like it was to do with the order in INSTALLED_APPS
Looks like its still there even if reordering the INSTALLED_APPS
Thanks
Try changing template_name_base for an InlineAjaxCRUD and it will give an error.
How does one go about overriding the templates in cruds/ajax folder individually for every InlineAjaxCRUD view?
I can copy ajax folder to my templates/cruds/ajax and work that way, but that will be for every inline view. I'd like to target a specific view with custom template.
Using: Python 2.7 Django 1.11 django-cruds-adminlte 0.13