Hi, I read DJANGO BOOK and Chapter 4: The Django template system. I read
Creating template objects and :

#python
Python 2.4.4c1 (#2, Oct 11 2006, 20:00:03) 
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.template import Template
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 907, in ?
    add_to_builtins('django.template.defaultfilters')
  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 904, in add_to_builtins
    builtins.append(get_library(module_name))
  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 893, in get_library
    mod = __import__(module_name, {}, {}, [''])
  File
"/usr/lib/python2.4/site-packages/django/template/defaultfilters.py",
line 5, in ?
    from django.utils.translation import gettext
  File
"/usr/lib/python2.4/site-packages/django/utils/translation/__init__.py",
line 3, in ?
    if settings.USE_I18N:
  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line
27, in __getattr__
    self._import_settings()
  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line
52, in _import_settings
    raise EnvironmentError, "Environment variable %s is undefined." %
ENVIRONMENT_VARIABLE
EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is
undefined.

Next 

[EMAIL PROTECTED]:~/iti$ export DJANGO_SETTINGS_MODULE=iti.settings
[EMAIL PROTECTED]:~/iti$ python
Python 2.4.4c1 (#2, Oct 11 2006, 20:00:03) 
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.template import Template
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 907, in ?
    add_to_builtins('django.template.defaultfilters')
  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 904, in add_to_builtins
    builtins.append(get_library(module_name))
  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 893, in get_library
    mod = __import__(module_name, {}, {}, [''])
  File
"/usr/lib/python2.4/site-packages/django/template/defaultfilters.py",
line 5, in ?
    from django.utils.translation import gettext
  File
"/usr/lib/python2.4/site-packages/django/utils/translation/__init__.py",
line 3, in ?
    if settings.USE_I18N:
  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line
27, in __getattr__
    self._import_settings()
  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line
54, in _import_settings
    self._target = Settings(settings_module)
  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line
82, in __init__
    raise EnvironmentError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
EnvironmentError: Could not import settings 'iti.settings' (Is it on
sys.path? Does it have syntax errors?): No module named iti.settings

Thanks


-- 
-------------------------------------------------
José Federico Muñoz Rubio <[EMAIL PROTECTED]>
Área de Sistemas
Instituto Tecnológico de Informática (UPV)
http://www.iti.upv.es
-------------------------------------------------

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

Reply via email to