-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename geoaware_tags to geoaware, and allow auto include of tags, and…
… added a defaults file
- Loading branch information
Showing
6 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
|
||
__version__ = '0.3.0' | ||
__version__ = '0.4.0' | ||
|
||
import defaults | ||
|
||
GEOIP_INCLUDE_TEMPLATE_TAGS = getattr(defaults, 'GEOIP_INCLUDE_TEMPLATE_TAGS') | ||
if GEOIP_INCLUDE_TEMPLATE_TAGS: | ||
from django import template | ||
application_tags = [ | ||
'geoaware.templatetags.geoaware', | ||
] | ||
for t in application_tags: template.add_to_builtins(t) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django.conf import settings | ||
|
||
try: | ||
from django.contrib.gis.geoip import GeoIP | ||
except ImportError: | ||
from django.contrib.gis.utils import GeoIP | ||
|
||
GEOIP_CACHE_METHOD = getattr(settings, 'GEOIP_CACHE_METHOD', GeoIP.GEOIP_INDEX_CACHE) | ||
GEOIP_INCLUDE_TEMPLATE_TAGS = getattr(settings, 'GEOIP_INCLUDE_TEMPLATE_TAGS', False) | ||
|
||
if getattr(settings, 'GEOIP_DEBUG_DOMAIN_OR_IP', ''): | ||
GEOIP_DEBUG_DOMAIN_OR_IP = getattr(settings, 'GEOIP_DEBUG_DOMAIN_OR_IP') |
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
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
File renamed without changes.