<s> from util . html import render_progress_bar <EOL> from django import template <EOL> import logging <EOL> register = template . Library ( ) <EOL> LOG = logging . getLogger ( __name__ ) <EOL> @ register . simple_tag <EOL> def render_capacity_html ( database ) : <EOL> try : <EOL> message = "<STR_LIT>" % ( <EOL> database . used_size_in_mb , ( database . total_size_in_mb ) or '<STR_LIT>' ) <EOL> return render_progress_bar ( database . capacity * <NUM_LIT:100> , message = message ) <EOL> except : <EOL> LOG . exception ( '<STR_LIT>' , database ) <EOL> return "<STR_LIT>" </s>
