Beispiel #1
0
def get_default_theme(user=None):
    theme_name = prefs(key="default_theme", 
                       namespace="x-themes", 
                       site=0, 
                       user=user,
                       order=['user','site'],
                       default=conf.DEFAULT_THEME)
    return models.Theme.objects.get(name=theme_name)
Beispiel #2
0
 def value(self, context, key=None, default=None, instance=None, site=None, consumer=None, account=None, rule=None, role=None, group=None, user=None, access=None, token=None, custom=None, namespace=None, language_code=None, trans=None, order=""):
     order = [item.strip() for item in order.split(",") if item.strip()]
     v = prefs(key=key, default=default, instance=instance, site=site, consumer=consumer, account=account, rule=rule, role=role, group=group, user=user, access=access, token=token, custom=custom, namespace=namespace, language_code=language_code, trans=trans, order=order)
     if not self.asvar:
         v = v or ""
     return v