mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-10-31 17:13:08 +00:00 
			
		
		
		
	Creation of the Stock list, edit, create views and creation StockItem create view
This commit is contained in:
		| @@ -1,5 +1,7 @@ | ||||
| from django.db import models | ||||
| from django.utils.translation import ugettext_lazy as _ | ||||
| from django.core.urlresolvers import reverse | ||||
|  | ||||
|  | ||||
| from counter.models import Counter | ||||
|  | ||||
| @@ -11,6 +13,9 @@ class Stock(models.Model): | ||||
| 	def __str__(self): | ||||
| 		return "%s (%s)" % (self.name, self.counter) | ||||
|  | ||||
| 	def get_absolute_url(self): | ||||
| 		return reverse('stock:list') | ||||
|  | ||||
| class StockItem(models.Model): | ||||
| 	""" The StockItem class, element of the stock """ | ||||
| 	name = models.CharField(_('name'), max_length=64) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user