Posted by eXt |
|
Hi!
Is there any particular reason to have templates in sphenecoll/templates and not in application folders? I think about structure like: - sphenecoll/sphene/sphblog/templates - sphenecoll/sphene/sphboard/templates - ... The above is IMHO better, because it allows us to use automatic template loaders and get rid of hardcoded paths from template_dirs in settings.py. See: Django docs for more. |
|
Posted by Herbert Poul |
|
i have to admit that it doesn't have any particular reason .. i basically decided on that layout before i were familiar enough with django ..
i just never felt the need to change it .. since after adding the directory once to the settings.py .. you can forget about it :) but i have to admit that there is no reason not to change it .. so .. i did it: http://yourhell.com/wsvn/root/django/communitytools/?rev=435&sc=1 this at least saves everyone one step when integrating SCT .. so i guess it's worth it ;) Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by eXt |
|
Great! Thanks a lot for implementing this! One more thing to mention here is that make-messages.py (i18n stuff) scans all files that are on the same level as the script and below it. So to generate messages I had to manually copy templates into an application folder to get it working.
Oh yes. It had confused me when I first looked at SCT. This change and MEDIA_URL one will make the process of integrating SCT easier. One more thing I think about is replacing hardcoded urls like: ../../somethingwith reverse()and {% url ... %}(in templates) calls. It caused some problems to me when I symlinked templates to application folders and media to some path. |
|
Posted by Herbert Poul |
|
there shouldn't be too much of those links any more .. i have replaced most of them (i only know of the 'Board' link in the breadcrumbs which is still hardcoded) - {% url ... %} won't work for SCT though .. i made my own {% sph_url .. %} because it has to pass through the 'urlconf' object ..
Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by eXt |
|
Err.. Searching through files for '../' shows:
For sphBoard - _displayBreadcrumbs.html (2 matches) - _displayCategories.html - _displayLatestPost.html (4 matches) - listCategories.html (12 matches) - showThread.thml (18 matches) - views.py (8 matches) --- Last Edited by Jakub Wiśniowski at 2008-02-17 21:12:42 --- |
|
Posted by Herbert Poul |
|
oops .. ok :) .. i guess the board link was the only one that made problems so far .. Hey, we have Signatures !!! Great, isn't it ? ;) |
Please login to post a reply.