Files
2012-02-21 01:15:00 -05:00

1 line
4.6 KiB
JSON

[{"user_id": 1822, "stars": [], "topic_id": 14174, "date_created": 1300692942.4672949, "message": "say one wants to provide base templates that can be extended where needed, and preserve a cloned project's ability to pull in improvements from upstream without causing merge issues in /templates/*", "group_id": 81, "id": 396515}, {"user_id": 1822, "stars": [], "topic_id": 14174, "date_created": 1300693004.9295101, "message": "one approach is to include base_templates, and instructions to include that in template_dirs setting, but looking for additional approaches to solving this problem", "group_id": 81, "id": 396518}, {"user_id": 11405, "stars": [{"date_created": 1300694575.563488, "user_id": 22944}], "topic_id": 14174, "date_created": 1300694411.8885579, "message": "most devs I have heard talking about this are strictly against providing any templates. If you provide any templates at all make them super simple. They are just for the curious who add your app to INSTALLED_APPS and want to see if it works immediately. Every project will want to style your output differently anyways so providing fancy templates is time wasted. Just document what context variables or template tags / filters they can use and let them vreate their own templates by overriding your super simple example template...", "group_id": 81, "id": 396632}, {"user_id": 16778, "stars": [], "topic_id": 14174, "date_created": 1300694941.6768329, "message": "i don't think every installer of re-usable software is going to write their own template from scratcg. Look at wordpress or phpbb for example", "group_id": 81, "id": 396687}, {"user_id": 1822, "stars": [], "topic_id": 14174, "date_created": 1300695661.7050159, "message": "@mbrochh I think your points are valid for apps, but less so reusable/starter projects where significant functionality can be available from the beginning", "group_id": 81, "id": 396746}, {"user_id": 209, "stars": [], "topic_id": 14174, "date_created": 1300711755.0446961, "message": "'reusable project' is an interesting way of looking at it. Something like Django-Packages. Honestly, the way pinax does it pretty much works. Check that out if you haven't before. Each app has it's own base templates, which extend from site_base.html, site_base extends from base. You can override as much or as little as you want.", "group_id": 81, "id": 397420}, {"user_id": 13325, "stars": [{"date_created": 1300711666.1874609, "user_id": 209}], "topic_id": 14174, "date_created": 1300711100.5283151, "message": "Unless your app is very advanced, there is no reason not to include some. If someone uses them, then you make them happy. If someone writes their own and used them, then they are happy also.", "group_id": 81, "id": 397396}, {"user_id": 1736, "stars": [{"date_created": 1300757118.0881341, "user_id": 11405}], "topic_id": 14174, "date_created": 1300727093.7569039, "message": "turnkey is stuff like ReviewBoard or Transifex, where the expected audience is sysadmins", "group_id": 81, "id": 400131}, {"user_id": 1736, "stars": [], "topic_id": 14174, "date_created": 1300726994.9081221, "message": "reusable app != turnkey app", "group_id": 81, "id": 400105}, {"user_id": 1736, "stars": [{"date_created": 1300728690.131187, "user_id": 275}, {"date_created": 1300757104.104795, "user_id": 11405}], "topic_id": 14174, "date_created": 1300727066.0352139, "message": "reusable app generally refers to something like django-threadedcomments or Celery, tools you drop into your project and just run with, but the end user is still a programmer", "group_id": 81, "id": 400128}, {"user_id": 1736, "stars": [{"date_created": 1300757119.015481, "user_id": 11405}], "topic_id": 14174, "date_created": 1300727145.6356709, "message": "Some projects, like django-cms, sit somewhere in the middle of the spectrum", "group_id": 81, "id": 400141}, {"user_id": 4077, "stars": [], "topic_id": 14174, "date_created": 1300735871.6637101, "message": "Back to the original question, I generally include them in my project's folder. So, if I've got 'projectx', then in 'projectx/templates/projectx' is where I store them. I dunno about putting them on sys.path, but on an out of the box Django, that works for templates within the project folder where the TEMPLATE_PATH variable is set to 'os.path.join('.', 'templates');'", "group_id": 81, "id": 401856}, {"user_id": 4077, "stars": [], "topic_id": 14174, "date_created": 1300735999.5823851, "message": "as for conventions within the templates, I like a 'projectx_base.html' for everything within the project to extend, and 'base.html' as the main template. I also try to include all the Pinax extras, like 'title', 'extra_head' and 'extra_scripts'.", "group_id": 81, "id": 401895}]