Skip to content

CachedLoader breaks application #73

Description

@jungornti

Hello!

We are using django-mobile in our project.

We use Django 1.9 and experienced trouble with cached loader: it ruined the application down with exceptions:

  1. ./manage.py runserver just crashed when tried to set flavour to mobile
  2. uwsgi has a maximum recursion depth exceeded when tried to set flavour to mobile

Our templates configuration is like this:

templates/base.html
templates/mobile/base.html

mobile/base.html has {% extends "base.html" %}

In this situation problem started to appear.

We had to turn off cached loaders at all, because django-mobile's loader is broken and Django's cached loader do not working with django-mobile.

As far as i see, the problem is in django-mobile's CachedLoader implementation — it does not understand what current flavour is, so it generate broken cache key for both base.html and mobile/base.html, which looks like this:

full:base.html

So the mobile template tries to extend "base.html", but gets itself content (with extend) instead of original, root base.html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions