Template library not found

32 views
Skip to first unread message

Mario8k

unread,
Nov 22, 2012, 10:27:12 AM11/22/12
to django...@googlegroups.com
Hi,

I have a custom templatetag inside an app, and also the app is in settings.INSTALLED_APPS. Also, I got an error:

"'contacto_formulario' is not a valid tag library: Template library contacto_formulario not found, tried ... "

The funny thing is that the templatetag works correctly in the development environment with "manage.py runserver", but not works deployed production environment.
This happens after a migration from Django 1.3 to 1.4

I don't know where to look for the error... Any idea? could i missing some setting?

thanks,

Mario.

I単igo Medina

unread,
Nov 22, 2012, 11:17:26 AM11/22/12
to django...@googlegroups.com

On Thu, 22 Nov 2012, Mario8k wrote:

> Hi,
>
> I have a custom templatetag inside an app, and also the app is in
> settings.INSTALLED_APPS. Also, I got an error:
>
> "'contacto_formulario' is not a valid tag library: Template library contacto_formulario not found, tried ... "
>
> The funny thing is that the templatetag works correctly in the development
> environment with "manage.py runserver", but not works deployed production
> environment.
> This happens after a migration from Django 1.3 to 1.4

Anything wrong on the definition of your tag? Has it been addded to
'TEMPLATE_LOADERS'? Do you have a conflict with names? Maybe
'contacto_formulario' should be renamed to 'contacto_formulario_tag'?

i�

>
> I don't know where to look for the error... Any idea? could i missing some
> setting?
>
>
> thanks,
>
> Mario.
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/B1gCPg7W8f4J.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>

Mario8k

unread,
Nov 22, 2012, 6:32:03 PM11/22/12
to django...@googlegroups.com, I単igo Medina


El jueves, 22 de noviembre de 2012 13:18:05 UTC-3, iñigo medina escribió:

On Thu, 22 Nov 2012, Mario8k wrote:

> Hi,
>
> I have a custom templatetag inside an app, and also the app is in
> settings.INSTALLED_APPS. Also, I got an error:
>
> "'contacto_formulario' is not a valid tag library: Template library contacto_formulario not found, tried ... "
>
> The funny thing is that the templatetag works correctly in the development
> environment with "manage.py runserver", but not works deployed production
> environment.
> This happens after a migration from Django 1.3 to 1.4

Anything wrong on the definition of your tag?

Maybe... i will chek it. But this template tag works OK in local webserver when i run "manage.py runserver".
It's failing when i run the app over apache with modwsgi on production environment.
 
Has it been addded to
'TEMPLATE_LOADERS'?

Yes, i have app_directories.Loader

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)
 
 
Do you have a conflict with names? Maybe
'contacto_formulario' should be renamed to 'contacto_formulario_tag'?

Maybe. I will try this approach.

i�

Thanks iñigo!
Do you speak spanish? Saludos!
Reply all
Reply to author
Forward
0 new messages