qz267 / django-google-analytics

Automatically exported from code.google.com/p/django-google-analytics
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Templatetags fail to initialize in some environments #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Run django using uwsgi where the wsgi python script is in the projects 
directory instead of in a specific project directory (ie, projects/my_project)
2. The wsgi python script should import the settings like this:

import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'my_project.settings'

What is the expected output? What do you see instead?

The following error occurs: "'analytics' is not a valid tag library: Could not 
load template library from django.templatetags.analytics, No module named 
settings"

Changing the import on line 5 of templatetags/analytics.py to the following 
works in all cases I was able to verify:

from django.conf import settings

Original issue reported on code.google.com by meetesh....@gmail.com on 25 Jun 2010 at 3:16