Hi,

The tutorial suggests A) (for a non-reusable app).

https://docs.djangoproject.com/en/1.7/intro/tutorial02/#ref-customizing-your-projects-templates

Collin

On Tuesday, January 6, 2015 at 10:25:10 AM UTC-5, Tobias Dacoir wrote:
>
> I have been working through the official Django 1.7 tutorial and also 
> Tango with Django but I'm confused as to where put my templates - I want to 
> follow best practices as much as possible.
> Now currently I only plan to develop a single project with a single app, 
> but I might want to include 3rd party apps later on.
> So I have created my project and started a new app inside. Since all pages 
> should use the same html template I wanted to place the base.html into the 
> project template folder. Or should I still put everything into the 
> app/template folder?
>
> Suggestion A)
> project_dir/templates/base.html
> project_dir/templates/app/index.html (extends base.html)
>
> Suggestion B)
> project_dir/app_dir/templates/base.html
> project_dir/app_dir/templates/index.html
>
> Suggestion C) (as in the tutorial)
> project_dir/app_dir/templates/base.html
> project_dir/app_dir/templates/app/index.html
>
>
> Later on when somebody goes to my website I want to show him some stuff 
> from my app on the index page already. So on http://mysite.com/ there 
> should already be content from my app, but there will also be static html 
> files like 'contact', 'impress', 'help' and so on, which I wanted to put 
> somewhere in my project folder and not within the app. But everything 
> should rely on the same base.html template so all pages use the same 
> javascript & css files. 
>
> Is there maybe another good tutorial for this available?
>

-- 
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+unsubscr...@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/e1b599fd-2232-4d87-929e-1d0e3283a7c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to