added aviary
This commit is contained in:
parent
f8545a26fe
commit
6af0a15f9e
10 changed files with 50 additions and 6 deletions
0
aviary/__init__.py
Normal file
0
aviary/__init__.py
Normal file
13
aviary/admin.py
Normal file
13
aviary/admin.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from .models import Aviary
|
||||
|
||||
|
||||
@admin.register(Aviary)
|
||||
class AviaryAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
"description",
|
||||
"condition",
|
||||
"last_ward_round",
|
||||
]
|
||||
list_filter = ("description", "condition", "last_ward_round")
|
6
aviary/apps.py
Normal file
6
aviary/apps.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AviaryConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "aviary"
|
0
aviary/migrations/__init__.py
Normal file
0
aviary/migrations/__init__.py
Normal file
12
aviary/models.py
Normal file
12
aviary/models.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from uuid import uuid4
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Aviary(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid4, editable=False)
|
||||
description = models.CharField(max_length=256)
|
||||
condition = models.CharField(max_length=256)
|
||||
last_ward_round = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.description
|
3
aviary/tests.py
Normal file
3
aviary/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
3
aviary/views.py
Normal file
3
aviary/views.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
Loading…
Add table
Add a link
Reference in a new issue