def get_salary_str(self) -> str: result = '' low_limit = format_currency( self.salary_from) if self.salary_from else '' high_limit = format_currency( self.salary_till) if self.salary_till else '' result += ' от {low}'.format(low=low_limit) result += ' до {high}'.format(high=high_limit) result += ' ' + self.salary_currency if self.salary_currency else '' return result
def get_salary_str(self): result = '' result += ' от %s' % format_currency(self.salary_from) if self.salary_from else '' result += ' до %s' % format_currency(self.salary_till) if self.salary_till else '' result += ' ' + self.salary_currency if self.salary_currency else '' return result