Skip to main content

No project description provided

Project description

A fork of “django-app-plugins” which caches the results of the lookups, saving several db queries per page.

Requirements:

Django 1.2 or higher, tested up to Django 1.3.1

An exaple of usage is in the blog post http://coderseye.com/2008/app-plugins-example.html A shortened part of this is copied here:

In our base template, we just have to put this tag:

{% plugin_point "shop_sidebar" %}

And in our shop/__init__.py file, we set up the plugin point like so:

def shop_sidebar(point, context, user, *args, **kwargs):
    '''A section on the sidebar of the base screen'''
    return { }

register.plugin_point(takes_context=True, takes_user=True)(shop_sidebar)

Lastly, we add a new template at templates/wishlist/plugins/shop_sidebar.html

{% load i18n %}
{% if user.is_authenticated %}
<p class="wishlist">
<a href="{% url satchmo_wishlist_view %}">
{% trans 'Wishlist' %}
</a></p>
{% endif %}

A complete functional example and test app from http://coderseye.com/files/app-plugin-test.zip is unzipped to the directory app_plugins/test_app and little upgraded for compatibility with Django 1.3.

One application, which registeres a plugin point by app_plugins. (app “site”) One (or more) application which provide output to this plugin point without knowledge about app_plugins. (app “someapp”)

cd app_plugins/test_app
python manage.py syncdb
python manage.py runserver

Browse to http://localhost:8000/ All templates with names name_of_app/plugins/name_of_pluginpoint.html are combined together to the same plugin point . Applications can be added or removed without changing anything except INSTALLED_APPS.

History

The original project http://code.google.com/p/django-app-plugins/ have been forked at changeset r19 on Jan 25, 2009 (http://code.google.com/p/django-app-plugins/source/detail?r=19 ) Changes of the original project made after this date are mostly not reflected yet.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangoplicity-caching-app-plugins-0.1.6.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file djangoplicity-caching-app-plugins-0.1.6.tar.gz.

File metadata

  • Download URL: djangoplicity-caching-app-plugins-0.1.6.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for djangoplicity-caching-app-plugins-0.1.6.tar.gz
Algorithm Hash digest
SHA256 c55c23905938b047e7abb2cca1bd801401e0eaa5782f900348979d11313e5556
MD5 734619dd8053463617cf45dad663d1ed
BLAKE2b-256 8d5176c3589aa879f8052f5bf37f96eceed5f07f16a3fb8d339f27daced6443b

See more details on using hashes here.

File details

Details for the file djangoplicity_caching_app_plugins-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: djangoplicity_caching_app_plugins-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for djangoplicity_caching_app_plugins-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5f50401a602464ce80ad49513bfa4f47c2b14fd01d195f336aee1b105089f2a8
MD5 394840c4221fca1bbfdf116b4fe7b932
BLAKE2b-256 be7b93e3a68d38f2bf96816e934eafed326015ad5bb483876efa642b9a0fdf9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page