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

Proof of concept: Support for Django cached template loader. #8

Closed
wants to merge 1 commit into from

Conversation

kjagiello
Copy link
Contributor

In the current version, Djedi is completely useless when using the Django cached template loader. The reason is that Djedi currently relies on the nodes being instantiated on each request. When using the cached loader,
the nodes are instantiated only on the first template load and being cached until the template cache is cleared. When using cached loaders, it's neither possible to edit nodes using the editor nor will they reflect language changes.

This patch provides a new template loader, DjediCachedLoader, that can be used as a drop-in replacement for the builtin Django cached template loader. It solves the described problem by refreshing each Djedi node on every template load.

To-do:

  • Figure an elegant way to run tests using different template loaders
  • Move the template loaders to a better place
  • The lazy_tag decorator is no longer needed. We should probably deprecate it.
  • Document the new cached loader.

This patch provides a new template loader, DjediCachedLoader, that
can be used as a drop-in replacement for the builtin Django cached
template loader in order to enable Djedi node editing and
language switching capabilities.
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 36d0d9d on kjagiello:master into e73bf0c on 5monkeys:master.

@kjagiello
Copy link
Contributor Author

Reorganizing branches in my fork. Closing this one.

@kjagiello kjagiello closed this Aug 6, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants