Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got 'django.template.loader_tags.ExtendsError' when customizing admin interface in Django 1.9 #68

Closed
wolfg1969 opened this issue Apr 23, 2016 · 2 comments

Comments

@wolfg1969
Copy link
Contributor

I have customizedd admin page by extending 'admin/base_site.html' template. The admin page is broken after add 'django_mobile.loader.Loader' to loaders of TEMPLATES settings. The error is 'ExtendsError: Cannot extend templates recursively when using non-recursive template loaders'.

My TEMPLATES Settings is below:

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        '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',
                'sekizai.context_processors.sekizai',
                'django_mobile.context_processors.flavour',
            ],
            'loaders': [
                'django_mobile.loader.Loader',
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
            ]
        },
    },
]
@gregmuellegger
Copy link
Owner

Seems like that is a matter of implementing the get_contents method on the mobile loader. See here: https://github.com/django/django/blob/master/django/template/loaders/base.py#L104

I think I won't get to that soonish.

@wolfg1969 would you like to create a pull request to solve this issue?

@wolfg1969
Copy link
Contributor Author

ok, I'll try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants