Commits

Udi Bauman  committed ca38e71 Merge
  • Participants
  • Parent commits 8496348, 5561c2a

Comments (0)

Files changed (7)

File .DS_Store

Binary file modified.

File data/ultrasound.datastore

Binary file removed.

File django_ultrasound/common/__init__.pyc

Binary file removed.

File django_ultrasound/common/customfields.pyc

Binary file removed.

File django_ultrasound/common/models.pyc

Binary file removed.

File django_ultrasound/events/admin.py

 from django.contrib import admin
 from events.models import *
 
+class HtmlPageAdmin(admin.ModelAdmin):
+    pass
+admin.site.register(HtmlPage, HtmlPageAdmin)
+
 class LocationAdmin(admin.ModelAdmin):
     list_display = ["locationName" ]
 admin.site.register(Location,LocationAdmin)

File django_ultrasound/sales/models.py

 from products.models import Product
 from events.models import Event,Allocation
 # Create your models here.
+
 class SaleStatus(models.Model):
     discriptionsStatus = models.CharField(_('the status  of the seles '),max_length=100)
 
+    def __unicode__(self):
+        return self.discriptionsStatus
+
+
 class Sale(models.Model):
     event = models.ForeignKey(Event,verbose_name= _("event"),related_name="event1",null=True, blank=True)
     product = models.ForeignKey(Product,verbose_name= _("product"),related_name="producr",null=True, blank=True)
     sales_man = models.ForeignKey(Employee, verbose_name= _("the employee in charge"),related_name="employee10",null=True, blank=True)
     sales_prices = models.DecimalField(_("price "), decimal_places=2,max_digits=5)
     status = models.ForeignKey(SaleStatus, verbose_name= _("the status of the sales")) 
-    status_date =models.DateTimeField(_("statusupdteTime"), auto_now=True)
+    status_date =models.DateTimeField(_("statusupdteTime"), auto_now=True)
+
+    def __unicode__(self):
+        return u"%s %s" % (_("Sale in event"), self.event.description)