mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 17:51:06 -03:30
Simplify Django organization, add South support.
This commit is contained in:
21
acom/main/models.py
Normal file
21
acom/main/models.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from django.db import models
|
||||
|
||||
class CommonModel(models.Model):
|
||||
''' common model for all object types that have these standard fields '''
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
name = models.TextField()
|
||||
description = models.TextField()
|
||||
creation_date = models.DateField()
|
||||
db_table = 'inventories'
|
||||
|
||||
class Inventory(CommonModel):
|
||||
|
||||
class Meta:
|
||||
db_table = 'inventory'
|
||||
|
||||
id = models.AutoField(primary_key=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user