Skip to content

Week 06 Homework#73

Closed
mattmakesmaps wants to merge 40 commits intocewing:masterfrom
mattmakesmaps:master
Closed

Week 06 Homework#73
mattmakesmaps wants to merge 40 commits intocewing:masterfrom
mattmakesmaps:master

Conversation

@mattmakesmaps
Copy link

@cewing
Copy link
Owner

cewing commented Feb 27, 2013

The only criticism I have of the work here is that you've bent yourself backwards to include templates and static files in the least django-like way possible. That being said, what you've done works, except that your STATICFILES_DIRS setting in settings.py is hard-coded to a path on your machine and thus does not work for mine.

The more django-like way to do this would be to include static files and templates for the bloggy portion of your app directly inside the djangor_app folder. These locations should be magically found by the django static file AppDirectoriesFinder and django template app_directories.Loader.

If you want, you can also include a 'static' or 'templates' directory in your main project folder (where settings.py is) that includes templates or static resources that belong to the whole site, and not just one subsystem.

Also, it's typically the case that an app subsystem like the 'blog' would define it's own urls and then you'd include those urls in the ROOT_URLCONF. Instead here you've put all urls into the ROOT_URLCONF file, which means that the project has to have knowledge of the apps it includes. This means that your app is more tightly coupled to the project and reduces the re-usability of individual components like the djangor_app.

@cewing cewing closed this Feb 27, 2013
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.

2 participants