dashboard_app/widget_base.py
def get_setting(self, setting_name, default=None):
        """
        Returns the setting for this widget from the database.

        :setting_name: The name of the setting.
        :default: Optional default value if the setting cannot be found.

        """
        try:
            setting = models.DashboardWidgetSettings.objects.get(
                widget_name=self.get_name(),
                setting_name=setting_name)
        except models.DashboardWidgetSettings.DoesNotExist:
            setting = default
        return setting
def get_setting(self, setting_name, default=None):
        try:
            setting = models.DashboardWidgetSettings.objects.get(
                widget_name=self.get_name(),
                setting_name=setting_name)
        except models.DashboardWidgetSettings.DoesNotExist:
            setting = default
        return setting
def get_setting ( self , setting_name , default = None ) : try : setting = models . DashboardWidgetSettings . objects . get ( widget_name = self . get_name ( ) , setting_name = setting_name ) except models . DashboardWidgetSettings . DoesNotExist : setting = default return setting
Returns the setting for this widget from the database.

        :setting_name: The name of the setting.
        :default: Optional default value if the setting cannot be found.
Returns the setting for this widget from the database .