|
@@ -40,7 +40,7 @@ class Credit(models.Model):
|
|
|
display_content = CharField(verbose_name='Display content/ visuals/ showreel',blank = True,max_length = 300)
|
|
display_content = CharField(verbose_name='Display content/ visuals/ showreel',blank = True,max_length = 300)
|
|
|
light_hardware = CharField(verbose_name='Light hardware (LED hardware)',blank = True,max_length = 300)
|
|
light_hardware = CharField(verbose_name='Light hardware (LED hardware)',blank = True,max_length = 300)
|
|
|
lightning_software = CharField(verbose_name='Lighting control software',blank = True,max_length = 300)
|
|
lightning_software = CharField(verbose_name='Lighting control software',blank = True,max_length = 300)
|
|
|
- Product_coordination = CharField(verbose_name='Product co-ordination',blank = True,max_length = 300)
|
|
|
|
|
|
|
+ product_coordination = CharField(verbose_name='Product co-ordination',blank = True,max_length = 300)
|
|
|
membrane_skin = CharField(verbose_name='Membrane skin',blank = True,max_length = 300)
|
|
membrane_skin = CharField(verbose_name='Membrane skin',blank = True,max_length = 300)
|
|
|
interaction_design = CharField(verbose_name='Interaction design/ programming',blank = True,max_length = 300)
|
|
interaction_design = CharField(verbose_name='Interaction design/ programming',blank = True,max_length = 300)
|
|
|
sponsor = CharField(verbose_name='Product sponsor/ support',blank = True,max_length = 500)
|
|
sponsor = CharField(verbose_name='Product sponsor/ support',blank = True,max_length = 500)
|
|
@@ -202,29 +202,30 @@ class Product(models.Model):
|
|
|
rechtsform = CharField ( 'Rechtsform', max_length = 32, help_text="Rechtsform des Projektes", null = True, blank=True )
|
|
rechtsform = CharField ( 'Rechtsform', max_length = 32, help_text="Rechtsform des Projektes", null = True, blank=True )
|
|
|
orga = CharField ( 'Organisationsform', max_length = 64, help_text="Organisationsform des Projektes.", null = True, blank=True )
|
|
orga = CharField ( 'Organisationsform', max_length = 64, help_text="Organisationsform des Projektes.", null = True, blank=True )
|
|
|
mitmachen = BooleanField( 'Mitmachen möglich', default=False, help_text="Kann jemand mitmachen?", null = True, blank=False )
|
|
mitmachen = BooleanField( 'Mitmachen möglich', default=False, help_text="Kann jemand mitmachen?", null = True, blank=False )
|
|
|
-
|
|
|
|
|
- title = CharField('Product Title',max_length = 100)
|
|
|
|
|
|
|
+ terms = NullBooleanField(help_text="")
|
|
|
|
|
+
|
|
|
|
|
+ title = CharField('Product Title',max_length = 100,null = True, blank=True)
|
|
|
country = CountryField(blank=True,multiple=True, help_text="")
|
|
country = CountryField(blank=True,multiple=True, help_text="")
|
|
|
city = CharField(max_length = 100,null = True, blank=True, help_text="")
|
|
city = CharField(max_length = 100,null = True, blank=True, help_text="")
|
|
|
year = IntegerField('Year of Completion',null = True, blank=True, help_text="")
|
|
year = IntegerField('Year of Completion',null = True, blank=True, help_text="")
|
|
|
owner = CharField(max_length = 300,null = True,blank=True, help_text="")
|
|
owner = CharField(max_length = 300,null = True,blank=True, help_text="")
|
|
|
teaser_txt = TextField(blank = True, max_length = 1050, help_text="")
|
|
teaser_txt = TextField(blank = True, max_length = 1050, help_text="")
|
|
|
- header = CharField(max_length = 900,null = True, help_text="")
|
|
|
|
|
- description_txt = TextField(max_length = 3000,null = True, help_text="")
|
|
|
|
|
- cid = IntegerField(null = True,blank=True, help_text="")
|
|
|
|
|
|
|
+ header = CharField(max_length = 900 , help_text="",null = True, blank=True)
|
|
|
|
|
+ description_txt = TextField(max_length = 3000 ,null = True, blank=True, help_text="")
|
|
|
|
|
+ #cid = IntegerField(null = True,blank=True, help_text="")
|
|
|
class_cid = CharField(null = True,max_length = 3, blank=True, help_text="")
|
|
class_cid = CharField(null = True,max_length = 3, blank=True, help_text="")
|
|
|
sumbitted = CharField(null = True,max_length = 10, blank=True, help_text="")
|
|
sumbitted = CharField(null = True,max_length = 10, blank=True, help_text="")
|
|
|
date_submitted = DateField(auto_now_add=True, help_text="")
|
|
date_submitted = DateField(auto_now_add=True, help_text="")
|
|
|
- terms = NullBooleanField(help_text="")
|
|
|
|
|
|
|
+
|
|
|
edit = NullBooleanField(help_text="")
|
|
edit = NullBooleanField(help_text="")
|
|
|
public = NullBooleanField(help_text="")
|
|
public = NullBooleanField(help_text="")
|
|
|
photo = CharField(max_length=500, null=True, blank=True, help_text="")
|
|
photo = CharField(max_length=500, null=True, blank=True, help_text="")
|
|
|
videocts = CharField(max_length=500, null=True, blank=True, help_text="")
|
|
videocts = CharField(max_length=500, null=True, blank=True, help_text="")
|
|
|
- category = ManyToManyField(Category, null=True, help_text="")
|
|
|
|
|
|
|
+ category = ManyToManyField(Category, help_text="",null = True, blank=True)
|
|
|
credits = ForeignKey(Credit, null = True,on_delete=models.SET_NULL, help_text="")
|
|
credits = ForeignKey(Credit, null = True,on_delete=models.SET_NULL, help_text="")
|
|
|
- description = ForeignKey(Description,null = True, on_delete=models.SET_NULL, help_text="")
|
|
|
|
|
|
|
+ description = ForeignKey(Description, on_delete=models.SET_NULL, help_text="",null = True, blank=True)
|
|
|
contact = ForeignKey(Contact, null = True,on_delete=models.SET_NULL, help_text="")
|
|
contact = ForeignKey(Contact, null = True,on_delete=models.SET_NULL, help_text="")
|
|
|
- interaction = ForeignKey(Interaction, null = True,on_delete = models.SET_NULL, help_text="")
|
|
|
|
|
|
|
+ #interaction = ForeignKey(Interaction, null = True,on_delete = models.SET_NULL, help_text="")
|
|
|
|
|
|
|
|
def __str__(self):
|
|
def __str__(self):
|
|
|
return str(self.title)
|
|
return str(self.title)
|
|
@@ -376,36 +377,36 @@ def auto_delete_reverse_keys(sender, instance, **kwargs):
|
|
|
|
|
|
|
|
|
|
|
|
|
class Link(models.Model):
|
|
class Link(models.Model):
|
|
|
- Product = ForeignKey(Product, on_delete=models.CASCADE)
|
|
|
|
|
|
|
+ product = ForeignKey(Product, on_delete=models.CASCADE)
|
|
|
link_description = CharField(null=True, blank=True, max_length = 2048)
|
|
link_description = CharField(null=True, blank=True, max_length = 2048)
|
|
|
link = URLField(null=True, blank=True, max_length = 2048)
|
|
link = URLField(null=True, blank=True, max_length = 2048)
|
|
|
|
|
|
|
|
-def Product_path(instance, filename):
|
|
|
|
|
- return 'marktplatz/media/{0}/{1}'.format(instance.Product.id, filename)
|
|
|
|
|
|
|
+def product_path(instance, filename):
|
|
|
|
|
+ return 'marktplatz/media/{0}/{1}'.format(instance.product.id, filename)
|
|
|
|
|
|
|
|
|
|
|
|
|
class Media(models.Model):
|
|
class Media(models.Model):
|
|
|
fs = FileSystemStorage(location=settings.MEDIA_ROOT)
|
|
fs = FileSystemStorage(location=settings.MEDIA_ROOT)
|
|
|
|
|
|
|
|
- Product = ForeignKey(Product, on_delete=models.CASCADE)
|
|
|
|
|
|
|
+ product = ForeignKey(Product, on_delete=models.CASCADE)
|
|
|
name_for = CharField(blank = True,max_length = 256)
|
|
name_for = CharField(blank = True,max_length = 256)
|
|
|
|
|
|
|
|
filename = CharField(max_length = 100)
|
|
filename = CharField(max_length = 100)
|
|
|
copyright = CharField(blank=True, max_length = 100)
|
|
copyright = CharField(blank=True, max_length = 100)
|
|
|
- image = ImageField(upload_to=Product_path,storage=fs)
|
|
|
|
|
- image_small = ProcessedImageField(upload_to=Product_path,
|
|
|
|
|
|
|
+ image = ImageField(upload_to=product_path,storage=fs)
|
|
|
|
|
+ image_small = ProcessedImageField(upload_to=product_path,
|
|
|
processors=[ResizeToCover(640, 360)],
|
|
processors=[ResizeToCover(640, 360)],
|
|
|
format='JPEG',
|
|
format='JPEG',
|
|
|
options={'quality': 90})
|
|
options={'quality': 90})
|
|
|
- image_medium= ProcessedImageField(upload_to=Product_path,
|
|
|
|
|
|
|
+ image_medium= ProcessedImageField(upload_to=product_path,
|
|
|
processors=[ResizeToCover(960, 540)],
|
|
processors=[ResizeToCover(960, 540)],
|
|
|
format='JPEG',
|
|
format='JPEG',
|
|
|
options={'quality': 90})
|
|
options={'quality': 90})
|
|
|
- image_big = ProcessedImageField(upload_to=Product_path,
|
|
|
|
|
|
|
+ image_big = ProcessedImageField(upload_to=product_path,
|
|
|
processors=[ResizeToCover(1920, 1080)],
|
|
processors=[ResizeToCover(1920, 1080)],
|
|
|
format='JPEG',
|
|
format='JPEG',
|
|
|
options={'quality': 90})
|
|
options={'quality': 90})
|
|
|
- image_norm = ProcessedImageField(upload_to=Product_path,
|
|
|
|
|
|
|
+ image_norm = ProcessedImageField(upload_to=product_path,
|
|
|
processors=[Thumbnail(640, 360)],
|
|
processors=[Thumbnail(640, 360)],
|
|
|
format='JPEG',
|
|
format='JPEG',
|
|
|
options={'quality': 90},
|
|
options={'quality': 90},
|
|
@@ -515,12 +516,12 @@ def auto_delete_file_on_delete(sender, instance, **kwargs):
|
|
|
|
|
|
|
|
|
|
|
|
|
class Video(models.Model):
|
|
class Video(models.Model):
|
|
|
- Product = ForeignKey(Product, on_delete=models.CASCADE)
|
|
|
|
|
|
|
+ product = ForeignKey(Product, on_delete=models.CASCADE)
|
|
|
name_for = CharField(blank=True, max_length=256)
|
|
name_for = CharField(blank=True, max_length=256)
|
|
|
|
|
|
|
|
filename = CharField(max_length=100)
|
|
filename = CharField(max_length=100)
|
|
|
copyright = CharField(blank=True, max_length=100)
|
|
copyright = CharField(blank=True, max_length=100)
|
|
|
- image = FileField(upload_to=Product_path)
|
|
|
|
|
|
|
+ image = FileField(upload_to=product_path)
|
|
|
|
|
|
|
|
@receiver(models.signals.post_delete, sender=Video)
|
|
@receiver(models.signals.post_delete, sender=Video)
|
|
|
def auto_delete_video_on_delete(sender, instance, **kwargs):
|
|
def auto_delete_video_on_delete(sender, instance, **kwargs):
|
|
@@ -555,7 +556,7 @@ def auto_delete_video_on_delete(sender, instance, **kwargs):
|
|
|
|
|
|
|
|
|
|
|
|
|
class Vote(models.Model):
|
|
class Vote(models.Model):
|
|
|
- Product = ForeignKey(Product, on_delete=models.CASCADE)
|
|
|
|
|
|
|
+ product = ForeignKey(Product, on_delete=models.CASCADE)
|
|
|
juryMember = ForeignKey(User, on_delete = models.CASCADE)
|
|
juryMember = ForeignKey(User, on_delete = models.CASCADE)
|
|
|
vote = PositiveSmallIntegerField(default=0)
|
|
vote = PositiveSmallIntegerField(default=0)
|
|
|
comment = CharField(blank=True, max_length =300)
|
|
comment = CharField(blank=True, max_length =300)
|