Changeset f52f909 for remit/vouchers
- Timestamp:
- May 31, 2010, 5:17:26 AM (15 years ago)
- Branches:
- master, client
- Children:
- 5e6ab71
- Parents:
- 6e43384
- git-author:
- Alex Dehnert <adehnert@…> (05/31/10 05:08:25)
- git-committer:
- Alex Dehnert <adehnert@…> (05/31/10 05:17:26)
- Location:
- remit/vouchers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
remit/vouchers/models.py
rb1e217a rf52f909 40 40 ('can_email', 'Can send mail about requests',), 41 41 ) 42 ordering = ['id', ] 42 43 43 44 def __unicode__(self, ): -
remit/vouchers/views.py
r6e43384 rf52f909 344 344 return Q(submitter=user.username) | Q(check_to_email=user.email) 345 345 346 request_list_orders = ( 347 # Name Label Columns 348 ('default', 'Default', ()), 349 ('id', 'ID', ('id', )), 350 ('state', 'Approval Status', ('approval_status', )), 351 ('stateamount', 'Approval Status, then amount', ('approval_status', 'amount', )), 352 ('stateto', 'Approval Status, then recipient', ('approval_status', 'check_to_first_name', 'check_to_last_name', )), 353 ('statesubmit', 'Approval Status, then submitter', ('approval_status', 'submitter', )), 354 ('name', 'Request Name', ('name', )), 355 ('amount', 'Amount', ('amount', )), 356 ('check_to', 'Check Recipient', ('check_to_first_name', 'check_to_last_name', )), 357 ('submitter', 'Submitter', ('submitter', )), 358 ) 359 346 360 @login_required 347 361 def show_requests(request, ): … … 353 367 useronly = True 354 368 369 if 'order' in request.REQUEST: 370 order_row = [row for row in request_list_orders if row[0] == request.REQUEST['order']] 371 if order_row: 372 order, label, cols = order_row[0] 373 qs = qs.order_by(*cols) 374 else: 375 raise Http404('Order by constraint not known') 376 else: 377 order = 'default' 378 379 355 380 return list_detail.object_list( 356 381 request, … … 358 383 extra_context={ 359 384 'useronly': useronly, 385 'order' : order, 386 'orders' : request_list_orders, 360 387 'pagename': 'list_requests', 361 388 },
Note: See TracChangeset
for help on using the changeset viewer.