You are writing a comment about Installing a Development Deployment of LifeFlow, a Django Blog Solution, here is a quick summary:
Comprehensive instructions on installing and setting up a local deployment of LifeFlow (for those who are moderately in the Django know). This should be all you need to get started using LifeFlow, but I will have another entry soon detailing the little tricks and tips that make LifeFlow helpful.
You are responding to this comment written by diN0bot on July 14th 2008, 01:43.
I'm wondering what others do to provide indirection/security to django projects. Do you find yourselves sharing apps, projects or both? If projects.... well here's what I've come up with:
(...umnh, not sure if this is needlessly complex. the goal is for global settings to be checked in and not have constant conflicts.)
Keep a checked in global, or general, settings.py file at the root of the project. Have a checked in folder, env, that contains a file, CURRENT, whose first line is the name of a folder in env that contains a local, or user specific, settings.py. eg,
/env
/env/CURRENT <--- single line of text: "snoopy"
/env/snoopy/settings.py <--- snoopy's database settings
- ordered
- list test
snoopy's settings need not be checked in. settings.default could always point to sqlite or somesuch.
At the bottom of the global settings.py add some code to look for local settings:
Determine the environment in env/CURRENT, then load settings.py from
that directory
env_file = PROJECT_PATH+path("/env/CURRENT")
def_env_file = PROJECT_PATH+path("/env/CURRENT.default")
if os.path.exists(env_file):
f = file(env_file)
elif os.path.exists(def_env_file):
f = file(def_env_file)
else:
raise IOError(env_file+" or "+def_env_file+" do not exist! Please
specify an environment\nhttp://bilumi.org/trac/wiki/FAQ.")
DEV_ENV = f.read().strip()
f.close()
env_settings_file = PROJECT_PATH+path("/env/"+DEV_ENV+"/settings.py")
try:
f = file(env_settings_file)
except IOError, e:
raise IOError(env_settings_file+" does not exist! Please create
this file.")
else:
env_settings = f.read()
f.close()
code = compile(env_settings, env_settings_file, 'exec')
exec(code)
the python markdown fails (displayed as normal text) if there are breaks in paragraphs...is this normal behavior? eg,
@ @ python
paragraph
break
paragraph
@ @
also i had trouble with getting links to work. and unordered list. maybe i'm doing something very wrong. i'll check lighthouse.
Please be aware that comment forms go stale after one hour.
Comments may make use of LifeFlow MarkDown. Raw html will be escaped.
Quick Introduction to LifeFlow MarkDown Syntax
A highlighted code block:
Other common languages work as well: scheme, python, java, html, etc.
Other markdown syntax: