Tweak renderer for Amount field for DepositLink view
This commit is contained in:
		
							parent
							
								
									928a3766bc
								
							
						
					
					
						commit
						99776b28d7
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -2,7 +2,7 @@ | |||
| ################################################################################ | ||||
| # | ||||
| #  Rattail -- Retail Software Framework | ||||
| #  Copyright © 2010-2016 Lance Edgar | ||||
| #  Copyright © 2010-2017 Lance Edgar | ||||
| # | ||||
| #  This file is part of Rattail. | ||||
| # | ||||
|  | @ -28,6 +28,7 @@ from __future__ import unicode_literals, absolute_import | |||
| 
 | ||||
| from rattail.db import model | ||||
| 
 | ||||
| from tailbone import forms | ||||
| from tailbone.views import MasterView | ||||
| 
 | ||||
| 
 | ||||
|  | @ -38,10 +39,13 @@ class DepositLinksView(MasterView): | |||
|     model_class = model.DepositLink | ||||
|     url_prefix = '/deposit-links' | ||||
| 
 | ||||
|     def configure_grid(self, g): | ||||
|     def _preconfigure_grid(self, g): | ||||
|         g.filters['description'].default_active = True | ||||
|         g.filters['description'].default_verb = 'contains' | ||||
|         g.default_sortkey = 'code' | ||||
|         g.amount.set(renderer=forms.renderers.CurrencyFieldRenderer) | ||||
| 
 | ||||
|     def configure_grid(self, g): | ||||
|         g.configure( | ||||
|             include=[ | ||||
|                 g.code, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar