Hackish Way to Execute on manage.py Action
It's cheap, hackish, and dirty, but it works. \\o/ Lines 19 & 20 are what you should edit.
- manage.py
- hack
It's cheap, hackish, and dirty, but it works. \\o/ Lines 19 & 20 are what you should edit.
This bash script clears the session variables prior to running the development server.
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.
Sometimes you have to serve null files. This quick hacky generic view lets you do that. The best example of that is robots.txt, I want my robots.txt to always be empty, at least for now. The other example would be favicon.ico, but that's more often used to actually fill a purpose.
3109 snippets posted so far.