Friday, March 6, 2015

Re: Sharing templates across multiple projects

Hi John,

I suggest you put the templates you want to share in a location accessible by your multiple projects and add this directory to your TEMPLATE_DIRS setting.

Make sure you have 'django.template.loaders.filesystem.Loader' in your TEMPLATE_LOADERS setting.

You could also make a third-party Django application only containing a "templates" directory and install it in all you projects and use the 'django.template.loaders.app_directories.Loader' loader.

Simon

Le jeudi 5 mars 2015 21:24:04 UTC-5, JHeasly a écrit :
Hello —

I'm looking for any blogposts/best practices for deploying a common set of templates across multiple Django projects.

My initial impulse is to just make a master Github repo of the template and pull it into each of the projects. Are there better approaches?

TIA,
John

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e9e2eead-b79b-42d2-9e9b-e2507aa942bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment