Use new config syntax for all Harvest views
This commit is contained in:
		
							parent
							
								
									cc48cf5013
								
							
						
					
					
						commit
						f3e05124c3
					
				
					 5 changed files with 40 additions and 5 deletions
				
			
		|  | @ -85,5 +85,12 @@ class HarvestClientView(HarvestMasterView): | |||
|         return HTML.tag('ul', c=items) | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
| def defaults(config, **kwargs): | ||||
|     base = globals() | ||||
| 
 | ||||
|     HarvestClientView = kwargs.get('HarvestClientView', base['HarvestClientView']) | ||||
|     HarvestClientView.defaults(config) | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
|     defaults(config) | ||||
|  |  | |||
|  | @ -113,5 +113,12 @@ class HarvestProjectView(HarvestMasterView): | |||
|         return entry.project | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
| def defaults(config, **kwargs): | ||||
|     base = globals() | ||||
| 
 | ||||
|     HarvestProjectView = kwargs.get('HarvestProjectView', base['HarvestProjectView']) | ||||
|     HarvestProjectView.defaults(config) | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
|     defaults(config) | ||||
|  |  | |||
|  | @ -61,5 +61,12 @@ class HarvestTaskView(HarvestMasterView): | |||
|         f.remove_field('time_entries') | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
| def defaults(config, **kwargs): | ||||
|     base = globals() | ||||
| 
 | ||||
|     HarvestTaskView = kwargs.get('HarvestTaskView', base['HarvestTaskView']) | ||||
|     HarvestTaskView.defaults(config) | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
|     defaults(config) | ||||
|  |  | |||
|  | @ -61,5 +61,12 @@ class HarvestTimeEntryView(HarvestMasterView): | |||
|         g.set_link('notes') | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
| def defaults(config, **kwargs): | ||||
|     base = globals() | ||||
| 
 | ||||
|     HarvestTimeEntryView = kwargs.get('HarvestTimeEntryView', base['HarvestTimeEntryView']) | ||||
|     HarvestTimeEntryView.defaults(config) | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
|     defaults(config) | ||||
|  |  | |||
|  | @ -106,5 +106,12 @@ class HarvestUserView(HarvestMasterView): | |||
|                 raise colander.Invalid(node, "Person not found (you must *select* a record)") | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
| def defaults(config, **kwargs): | ||||
|     base = globals() | ||||
| 
 | ||||
|     HarvestUserView = kwargs.get('HarvestUserView', base['HarvestUserView']) | ||||
|     HarvestUserView.defaults(config) | ||||
| 
 | ||||
| 
 | ||||
| def includeme(config): | ||||
|     defaults(config) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar