Compare commits
2 Commits
50405639c2
...
fdfd8e28f6
Author | SHA1 | Date |
---|---|---|
|
fdfd8e28f6 | |
|
30f6451727 |
|
@ -1,8 +1,5 @@
|
|||
from django.contrib import admin
|
||||
from .models import CustomTable, BaseCustomField, Image, Element3D, ClickableArea
|
||||
from .models import CustomTable, BaseCustomField
|
||||
|
||||
admin.site.register(CustomTable)
|
||||
admin.site.register(BaseCustomField)
|
||||
admin.site.register(Image)
|
||||
admin.site.register(Element3D)
|
||||
admin.site.register(ClickableArea)
|
|
@ -17,29 +17,3 @@ class CustomTable(models.Model):
|
|||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
class Image(models.Model):
|
||||
file = models.ImageField(upload_to='images/')
|
||||
alt = models.CharField(max_length=255)
|
||||
title = models.CharField(max_length=255)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
class Element3D(models.Model):
|
||||
model_file = models.FileField(upload_to='models/')
|
||||
name = models.CharField(max_length=255)
|
||||
description = models.TextField()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class ClickableArea(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
description = models.TextField()
|
||||
object_name = models.CharField(max_length=255)
|
||||
target = models.ForeignKey(Element3D, on_delete=models.CASCADE, related_name='clickable_areas')
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
Loading…
Reference in New Issue