enabled django-suit for admin
This commit is contained in:
@@ -33,12 +33,15 @@ SECRET_KEY = 'td*#7t-(1e9^(g0cod*hs**dp(%zvg@=$cug_-dtzcj#i2mrz@'
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'suit',
|
||||
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.gis',
|
||||
|
||||
# 3rd party
|
||||
'rest_framework',
|
||||
|
||||
@@ -42,4 +42,11 @@ class Company(models.Model):
|
||||
# internal
|
||||
created = models.DateTimeField('date of creation', auto_now_add=True)
|
||||
updated = models.DateTimeField('date last update', auto_now=True)
|
||||
creator = models.ForeignKey('core.CustomUser', on_delete=models.DO_NOTHING, null=True, related_name='company')
|
||||
creator = models.ForeignKey('core.CustomUser', on_delete=models.DO_NOTHING, null=True, related_name='company')
|
||||
|
||||
def __str__(self):
|
||||
return self.company_name
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Compañía"
|
||||
verbose_name_plural = "Compañías"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from . import models
|
||||
|
||||
# Register your models here.
|
||||
admin.register(models.CustomUser)
|
||||
|
||||
@@ -43,3 +43,9 @@ class Product(models.Model):
|
||||
creator = models.ForeignKey('core.CustomUser', on_delete=models.DO_NOTHING, null=True, related_name='product')
|
||||
# history = models.FoiregnKey('history.History', on_delete=models.DO_NOTHING, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} / {self.sku}"
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Producto"
|
||||
verbose_name_plural = "Productos"
|
||||
|
||||
Reference in New Issue
Block a user