Login

Snippets by ajs17

Snippet List

Dynamically specify TEMPLATE_DIRS

In your site’s settings.py module (in your site root), TEMPLATE_DIRS takes absolute paths. Here is a way to dynamically determine the absolute path to the application directory so you only have to specify relative paths within settings.py. Obviously, replace “application_directory” with the name of your application’s directory.

  • configuration
Read More

ajs17 has posted 1 snippet.