Shorten code for retrieving button title

pull/2473/head
Matt Westcott 2016-04-22 17:24:23 +01:00
rodzic c35c1f360a
commit 73e1961f96
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -261,14 +261,10 @@ class BaseDropdownMenuButton(Button):
raise NotImplementedError
def render(self):
if 'title' in self.attrs:
title = self.attrs['title']
else:
title = None
return render_to_string(self.template_name, {
'buttons': self.get_buttons_in_dropdown(),
'label': self.label,
'title': title,
'title': self.attrs.get('title'),
'is_parent': self.is_parent})