Adds basic template tag for available categories. Currently does not check enabling conditions.
This commit is contained in:
		
							parent
							
								
									478b328e41
								
							
						
					
					
						commit
						c192fef491
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		
							
								
								
									
										0
									
								
								registrasion/templatetags/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								registrasion/templatetags/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										10
									
								
								registrasion/templatetags/registrasion_tags.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								registrasion/templatetags/registrasion_tags.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | |||
| from registrasion import models as rego | ||||
| 
 | ||||
| from django import template | ||||
| 
 | ||||
| register = template.Library() | ||||
| 
 | ||||
| @register.assignment_tag(takes_context=True) | ||||
| def available_categories(context): | ||||
|     ''' Returns all of the available product categories ''' | ||||
|     return rego.Category.objects.all() | ||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Christopher Neugebauer
						Christopher Neugebauer