Dear Malcom;
I have commented this line #from template.models import Template
in template/loaders/database.py
and it works fine with but i don't know if it will affect any of the
functionality or not
also my setting.py is :
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
'myapp.template.loaders.database.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
"myapp.middleware.threadlocals.ThreadLocals",
)
ROOT_URLCONF = 'myapp.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates".
# Always use forward slashes, even on Windows.
"/var/www/myapp/Template_Dir/",
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.markup',
'.myapp.articles',
'myapp.stockphoto',
'myapp.template',
)
On Mar 7, 2:42 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2007-03-06 at 15:45 -0800, Mary wrote:
> > 1. installed django-databasetemplateloader.tar.gz
> > 2. put template folder in my project
> > 3. add in setting.py the following:'myapp.template',and
> > 'myapp.template.loaders.database.load_template_source',
> > 4. I restarted my django server
> > 5. I execute python manage.py syncdb
> > i got this error:
>
> > Exception Type: ImproperlyConfigured
> > Exception Value: Error importing template source loader
> > hsf.template.loaders.database: "No module named template.models"
> > Exception Location: /usr/lib/python2.4/site-packages/Django-0.95.1-
> > py2.4.egg/django/template/loader.py in find_template_source, line 56
>
> [...]
>
> Certainly sounds like a path error somewhere or an installation problem.
> Does it fail for a very simple project with one app and a simple model
> with only one field? If so, that would indicate a Django installation
> problem. If not, how much extra information do you need to add to move
> it closer to your current setup before things fail?
>
> Could you post your settings.py file? In particular, the template loader
> and installed apps sections. I suspect you have made a typo in there
> somewhere.
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---