|
|
|
@ -36,8 +36,16 @@ def classname(obj): |
|
|
|
|
|
|
|
|
|
|
|
@register.inclusion_tag('buttons/history.html') |
|
|
|
def history_button(instance, text=None, html_class=None): |
|
|
|
"""Creates the correct history button for an instance.""" |
|
|
|
def history_button(instance, text=False, html_class=True): |
|
|
|
"""Creates the correct history button for an instance. |
|
|
|
|
|
|
|
Args: |
|
|
|
instance: The instance of which you want to get history buttons. |
|
|
|
text: Flag stating if a 'History' text should be displayed. |
|
|
|
html_class: Flag stating if the link should have the html classes |
|
|
|
allowing it to be displayed as a button. |
|
|
|
|
|
|
|
""" |
|
|
|
return { |
|
|
|
'application': instance._meta.app_label, |
|
|
|
'name': instance._meta.model_name, |
|
|
|
|