Package hm :: Package db :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Classes [hide private]
  UserNotAuthenticated
  UserObjectOrIntegerExpected
  ModelMixin
ModelMixin is a mix-in used to provide common methods, attributes, and hooks across all models.

At initialization, ModelMixin is mixed into all models listed in models.ALL_MODELS.

Functions [hide private]
 
get_sql(query) source code
 
mixin(mixin, klasses, last=0) source code
 
mixin_method(klasses) source code
 
mixin_property(klasses) source code
 
validate_user(user) source code
 
current_user() source code
 
clean_decorator(decorator)
This decorator can be used to turn simple functions into well-behaved decorators, so long as the decorators are fairly simple. If a decorator expects a function and returns a function (no descriptors), and if it doesn't modify function attributes or docstring, then it is eligible to use this. Simply apply @simple_decorator to your decorator and it will automatically preserve the docstring and function attributes of functions to which it is applied.
source code
 
merge_many_to_many(items, binder, queryset, single_result=False, id_path='id') source code
 
merge_polymorphic(items, binder, queryset, single_result=False, base_path='', item_type_path='item_type', item_id_path='item_id') source code
 
propget(func) source code
 
propset(func) source code
 
propdel(func) source code
 
get_new_cache_name() source code
 
cached_property(func, name=None) source code
Variables [hide private]
  cache_names = {}
Function Details [hide private]

validate_user(user)

source code 
Raises:

current_user()

source code 
Raises: