Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added settings.py modification after creating a template #115

Closed
wants to merge 1 commit into from
Closed

Added settings.py modification after creating a template #115

wants to merge 1 commit into from

Conversation

doriczapari
Copy link
Contributor

I couldn't make my app work with the base template until I added the TEMPLATE_DIRS line in the settings.py file, just like we did with the static files. I hope this is a useful contributon as this is my first one ever! :)

@bmispelon
Copy link
Contributor

Using TEMPLATE_DIRS is the proper way to do it but it shouldn't have been necessary since 'mysite' is in INSTALLED_APPS so its templates are found automatically.

I haven't done the tutorial from beginning to end in a while, but maybe what is missing is simply a restart of runserver (it usually detects new/modified files automatically but it's possible that a new directory might not trigger the automatic restart).

@olasitarska
Copy link
Member

I just fixed it a couple of days ago with this: 5c1a110. @doriczapari probably took tutorial before this change...

@bmispelon what is easiest / best solution? I am on the fence :)

@doriczapari
Copy link
Contributor Author

@olasitarska yes, for me there was only ´'blog'´ in ´INSTALLED_APPS´, I had a hunch this could be the problem but I wasn't familiar enough with Django yet to prove my point :) Thanks!

@bmispelon
Copy link
Contributor

For me, having mysite in INSTALLED_APPS is kind of a hack and I think we can fix it without making things more complicated.

I'll try to work on this and review the current situation this week.

@bmispelon
Copy link
Contributor

I opened #117 as an alternative solution to this.

The approach I took there is to put all the templates inside the blog application so we don't need to either add mysite to INSTALLED_APPS or add the TEMPLATE_DIRS settings.

Feedback welcome as always,
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants