~ubuntu-branches/debian/sid/python-django/sid

« back to all changes in this revision

Viewing changes to django/contrib/flatpages/templatetags/flatpages.py

  • Committer: Package Import Robot
  • Author(s): Raphaël Hertzog
  • Date: 2014-09-17 14:15:11 UTC
  • mfrom: (1.3.17) (6.2.18 experimental)
  • Revision ID: package-import@ubuntu.com-20140917141511-icneokthe9ww5sk4
Tags: 1.7-2
* Release to unstable.
* Add a migrate-south sample script to help users apply their South
  migrations. Thanks to Brian May.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from django import template
2
2
from django.conf import settings
3
3
from django.contrib.flatpages.models import FlatPage
4
 
from django.contrib.sites.models import get_current_site
 
4
from django.contrib.sites.shortcuts import get_current_site
5
5
 
6
6
 
7
7
register = template.Library()
73
73
    """
74
74
    bits = token.split_contents()
75
75
    syntax_message = ("%(tag_name)s expects a syntax of %(tag_name)s "
76
 
                       "['url_starts_with'] [for user] as context_name" %
77
 
                       dict(tag_name=bits[0]))
78
 
   # Must have at 3-6 bits in the tag
 
76
                      "['url_starts_with'] [for user] as context_name" %
 
77
                      dict(tag_name=bits[0]))
 
78
    # Must have at 3-6 bits in the tag
79
79
    if len(bits) >= 3 and len(bits) <= 6:
80
80
 
81
81
        # If there's an even number of bits, there's no prefix