Hide 'tos' pull-down selector from Program profile forms.
Until a way to select Documents for use as the Terms of Service for a Program
exists (see http://code.google.com/p/soc/issues/detail?id=151), there is no
point in hacking in scope_path and link_id fields here. The per-Program ToS
feature will just be unavailable until an appropriate Document selector
exists.
Patch by: Todd Larsen
Review by: to-be-reviewed
from django.conf import settings# function that will pass a test.def pass_test(*args): returndef no_backend(test_func, backend): "Use this decorator to disable test on specified backend." if settings.DATABASE_ENGINE == backend: return pass_test else: return test_func# Decorators to disable entire test functions for specific# spatial backends.def no_oracle(func): return no_backend(func, 'oracle')def no_postgis(func): return no_backend(func, 'postgresql_psycopg2')def no_mysql(func): return no_backend(func, 'mysql')# Shortcut booleans to omit only portions of tests.oracle = settings.DATABASE_ENGINE == 'oracle'postgis = settings.DATABASE_ENGINE == 'postgresql_psycopg2' mysql = settings.DATABASE_ENGINE == 'mysql'