nonsense commit

This commit is contained in:
Sanj 2011-07-06 18:22:17 +05:30
parent 0688c0313d
commit bfc6b9c637

View File

@ -88,9 +88,9 @@ class Product(models.Model):
def get_print_multiplier(self, dpi): def get_print_multiplier(self, dpi):
# product = Product.objects.get(pk=self.product.id) # product = Product.objects.get(pk=self.product.id)
print_width_mm = self.typ.print_width print_width_mm = self.typ.print_width
dpm = dpi // 25.4 dpm = dpi / 25.4
pixel_width = print_width_mm * dpm pixel_width = print_width_mm * dpm
m = pixel_width // 800.0 m = pixel_width / 800.0
return m return m
def get_page_list(self): def get_page_list(self):
@ -105,7 +105,7 @@ class Product(models.Model):
aspect_ratio = self.typ.aspect_ratio aspect_ratio = self.typ.aspect_ratio
width = width + .0 width = width + .0
height = int(round(width / aspect_ratio)) height = int(round(width / aspect_ratio))
return (int(width), height,) return (int(round(width)), height,)
class Video(models.Model): class Video(models.Model):
fil = models.ForeignKey(File) fil = models.ForeignKey(File)