# Path: app/models.py
# class Project(models.Model):
#     name = models.CharField(max_length=100)
#     added = models.DateTimeField(default=datetime.now)
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.name
# 
#     class Meta:
#         ordering = ('name',)
# 
# class Assessment(models.Model):
#     name = models.CharField(max_length=100)
#     project = models.ForeignKey(Project, on_delete=models.CASCADE)
#     added = models.DateTimeField(default=datetime.now)
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.name
# 
#     class Meta:
#         ordering = ('name',)
# 
# class Sh0t(models.Model):
#     title = models.CharField(max_length=200)
#     body = models.TextField(default="")
#     assessment = models.ForeignKey(Assessment, null=True, on_delete=models.CASCADE)
#     added = models.DateTimeField(default=datetime.now)
#     severity = models.IntegerField(default=5, validators=[MinValueValidator(0), MaxValueValidator(5)])
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.title
# 
#     class Meta:
#         ordering = ('severity','title',)
# 
# class Flag(models.Model):
#     title = models.CharField(max_length=100)
#     note = models.TextField(default="")
#     assessment = models.ForeignKey(Assessment, null=True, on_delete=models.CASCADE)
#     done = models.BooleanField(default=False)
#     added = models.DateTimeField(default=datetime.now)
#     order = models.IntegerField(default=1)
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.title
# 
#     class Meta:
#         ordering = ('title',)
# 
# class Template(models.Model):
#     name = models.CharField(max_length=100)
#     body = models.TextField(default="")
#     added = models.DateTimeField(default=datetime.now)
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.name
# 
#     class Meta:
#         ordering = ('name',)


from django.contrib import admin
from .models import Project, Assessment, Sh0t, Flag, Template
# -*- coding: utf-8 -*-
from __future__ import unicode_literals



class FlagAdmin(admin.ModelAdmin):
    list_display = ('title', 'assessment', 'added', 'order')


admin.site.register(Project)

# Path: app/models.py
# class Project(models.Model):
#     name = models.CharField(max_length=100)
#     added = models.DateTimeField(default=datetime.now)
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.name
# 
#     class Meta:
#         ordering = ('name',)
# 
# class Assessment(models.Model):
#     name = models.CharField(max_length=100)
#     project = models.ForeignKey(Project, on_delete=models.CASCADE)
#     added = models.DateTimeField(default=datetime.now)
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.name
# 
#     class Meta:
#         ordering = ('name',)
# 
# class Sh0t(models.Model):
#     title = models.CharField(max_length=200)
#     body = models.TextField(default="")
#     assessment = models.ForeignKey(Assessment, null=True, on_delete=models.CASCADE)
#     added = models.DateTimeField(default=datetime.now)
#     severity = models.IntegerField(default=5, validators=[MinValueValidator(0), MaxValueValidator(5)])
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.title
# 
#     class Meta:
#         ordering = ('severity','title',)
# 
# class Flag(models.Model):
#     title = models.CharField(max_length=100)
#     note = models.TextField(default="")
#     assessment = models.ForeignKey(Assessment, null=True, on_delete=models.CASCADE)
#     done = models.BooleanField(default=False)
#     added = models.DateTimeField(default=datetime.now)
#     order = models.IntegerField(default=1)
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.title
# 
#     class Meta:
#         ordering = ('title',)
# 
# class Template(models.Model):
#     name = models.CharField(max_length=100)
#     body = models.TextField(default="")
#     added = models.DateTimeField(default=datetime.now)
# 
#     def __str__(self):  # __unicode__ on Python 2
#         return self.name
# 
#     class Meta:
#         ordering = ('name',)


# Path: app/admin.py
from django.contrib import admin
from .models import Project, Assessment, Sh0t, Flag, Template

# -*- coding: utf-8 -*-
from __future__ import unicode_literals



class FlagAdmin(admin.ModelAdmin):
    list_display = ('title', 'assessment', 'added', 'order')


admin.site.register(Project)

admin.site.register(Assessment)