This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css" media="screen"> | |
.spacer { | |
display: block; | |
height: 1600px; | |
} | |
.block { | |
display: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.template import Library | |
from django.templatetags.future import URLNode, url | |
register = Library() | |
class AbsoluteURLNode(URLNode): | |
def __init__(self, view_name, args, kwargs, asvar, legacy_view_name=True): | |
super(AbsoluteURLNode, self).__init__(view_name, | |
args, | |
kwargs, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Detect which mode the wsgi module is in. | |
# Uncomment this to see whether or not the wsgi module is in daemon mode, which is necessary for the monitor. | |
def application(environ, start_response): | |
status = '200 OK' | |
if not environ['mod_wsgi.process_group']: | |
output = 'EMBEDDED MODE' | |
else: | |
output = 'DAEMON MODE' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, os.path | |
import sys | |
# Unless your project is already on your PYTHONPATH by default, you need to add it: | |
# project_directory should point to your project's parent directory. | |
project_directory = os.path.join(os.path.dirname(__file__), '..') | |
if project_directory not in sys.path: | |
sys.path.append(project_directory); | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' |
NewerOlder