<s> from django . utils . translation import ugettext_lazy as _ <EOL> from horizon import tabs <EOL> from horizon import workflows <EOL> from openstack_dashboard . dashboards . admin . defaults import tabs as project_tabs <EOL> from openstack_dashboard . dashboards . admin . defaults import workflows as project_workflows <EOL> from openstack_dashboard . usage import quotas <EOL> class IndexView ( tabs . TabbedTableView ) : <EOL> tab_group_class = project_tabs . DefaultsTabs <EOL> template_name = '<STR_LIT>' <EOL> class UpdateDefaultQuotasView ( workflows . WorkflowView ) : <EOL> workflow_class = project_workflows . UpdateDefaultQuotas <EOL> def get_initial ( self ) : <EOL> initial = super ( UpdateDefaultQuotasView , self ) . get_initial ( ) <EOL> try : <EOL> quota_defaults = quotas . get_default_quota_data ( self . request ) <EOL> for field in ( quotas . QUOTA_FIELDS + quotas . MISSING_QUOTA_FIELDS ) : <EOL> initial [ field ] = quota_defaults . get ( field ) . limit <EOL> except Exception : <EOL> error_msg = _ ( '<STR_LIT>' ) <EOL> self . add_error_to_step ( error_msg , '<STR_LIT>' ) <EOL> return initial </s>
