Created
October 14, 2011 10:10
-
-
Save simahawk/1286732 to your computer and use it in GitHub Desktop.
lfs template tag example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import template | |
register = template.Library() | |
import lfs.cart.utils | |
from lfs.core.models import Shop | |
from lfs.caching.utils import lfs_get_object_or_404 | |
@register.inclusion_tag("lfs/disclaimer.html") | |
def disclaimer(): | |
shop = lfs_get_object_or_404(Shop, pk=1) | |
return { 'shop':shop } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment