Simple decorator to set attributes of target function or class in a DRY way.
Project description
Usage example:
# Django proposes: def my_calculated_field(... my_calculated_field.short_description = 'Field' my_calculated_field.admin_order_field = 'real_field' # DRY: @attr(short_description='Field', admin_order_field='real_field') def my_calculated_field(...
Get it:
sudo pip install attr from attr import attr
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
attr-0.1.0.tar.gz
(1.2 kB
view hashes)