On Wed, 2007-03-07 at 01:41 -0800, Mary wrote: > 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
That's not a good idea. It will break a lot of things having to do with templating. > 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', This line looks a little suspicious (the leading '.'), but it may be fine. > 'myapp.stockphoto', > 'myapp.template', This is probably where your problem lies. From your error message, it looks like there is some confusion between your package called "template" and Django's internal "template" package. Try renaming your version to "myapp.templateX" or something like that and see if the problem goes away. I realise this is a bit ugly if it is the solution, but some of the dynamic importing inside Django can cause problems sometimes. If renaming here does make your problem go away, let us know, because it might be something we can look at fixing in the future. (And, obviously, if that doesn't fix the problem, let us know too and somebody might have some other ideas.) 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 -~----------~----~----~----~------~----~------~--~---

