Created
January 30, 2014 20:55
-
-
Save jacobvalenta/8718472 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomerSearchView(DatatableView): | |
template_name = "customers/search.html" | |
datatable_options = { | |
'columns': [ | |
("Customer Number", 'number'), | |
("Name", ['first_name', 'last_name']), | |
"Address", | |
"Quick Menu", | |
"View Customer", | |
] | |
} | |
def get_column_Address_data(self, instance, *args, **kwargs): | |
pass | |
def get_column_Quick_Menu_data(self, instance, *args, **kwargs): | |
return '...' | |
def get_column_View_Customer_data(self, instance, *args, **kwargs): | |
return 'View Customer' | |
def get_queryset(self): | |
return Customer.objects.all() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment