Also the stupid thing as well, we are already using 'templatetags' and
'filters'.. I just had no idea it supported 'appname/templates' as well.

*doh*

Cal

On Tue, Jan 1, 2013 at 8:47 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:

> Just realised why this has been so heavily debated, and just discovered
> something new.
>
> https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
> django.template.loaders.app_directories.Loader
>
> If 'myproject.polls' is placed into INSTALLED_APPS then Django will look
> at '/path/to/myproject/polls/templates/' for the templates.
>
> I didn't even know about app_directories loader, and using it sounds much
> cleaner than having to use relative paths.
>
> In regards to the other two vars (media root etc), as stated before, those
> should really be deployment specific and not relative, this is a devops
> problem not a code problem.
>
> As such, I'm now -9000 on supporting relative paths.
>
> Thanks for explaining this Florian - makes a lot more sense now.
>
> Cal
>
> On Tue, Jan 1, 2013 at 7:36 PM, Florian Apolloner 
> <f.apollo...@gmail.com>wrote:
>
>> Hi,
>>
>>
>> On Tuesday, January 1, 2013 7:48:59 PM UTC+1, Cal Leeming [Simplicity
>> Media Ltd] wrote:
>>>
>>> Rather than saying "spend 30 seconds thinking about it", could you
>>> perhaps spend 30 seconds explaining why using relative paths for
>>> TEMPLATE_DIRS would be considered a bad thing to do?
>>
>>
>> I don't think that per se it would be a bad thing to do, but then you
>> could also just dump the project name (from startproject) into
>> INSTALLED_APPS and have the same effect (plus you can have project
>> templatetags and filters, yay :)) as Aymeric already tried to explain. I
>> guess your point for relative TEMPLATE_DIRS is only that you can have
>> PROJECT_DIR + templates which is already fullfiller by the app
>> template-loader in a much cleaner way imo.
>>
>> I hope that clears things up a bit.
>>
>> Cheers,
>> Florian
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-developers/-/xuVeOmwI_8AJ.
>>
>> To post to this group, send email to django-developers@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-developers+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-developers?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to