Compare commits

..

2 Commits

9 changed files with 28 additions and 2 deletions

View File

@ -72,6 +72,7 @@ INSTALLED_APPS = [
"api",
"rest_framework",
"frontImages",
"object",
]
MIDDLEWARE = [

View File

@ -1,6 +1,5 @@
from django.contrib import admin
from .models import Image, Element3D, ClickableArea
from .models import Element3D, ClickableArea
admin.site.register(Image)
admin.site.register(Element3D)
admin.site.register(ClickableArea)

0
back/object/__init__.py Normal file
View File

5
back/object/admin.py Normal file
View File

@ -0,0 +1,5 @@
from django.contrib import admin
from .models import object
admin.site.register(object)

6
back/object/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class ObjectConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'object'

View File

9
back/object/models.py Normal file
View File

@ -0,0 +1,9 @@
from django.db import models
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

3
back/object/tests.py Normal file
View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
back/object/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.