#42 Levels for places
This commit is contained in:
@@ -11,6 +11,13 @@ from lostplaces.models.abstract_models import Submittable, Taggable, Mapable
|
||||
from easy_thumbnails.fields import ThumbnailerImageField
|
||||
from easy_thumbnails.files import get_thumbnailer
|
||||
|
||||
PLACE_LEVELS = (
|
||||
(1, 'Ruin'),
|
||||
(2, 'Vandalized'),
|
||||
(3, 'Natures Treasure'),
|
||||
(4, 'Long Time no See'),
|
||||
(5, 'Time Capsule')
|
||||
)
|
||||
|
||||
class Place(Submittable, Taggable, Mapable):
|
||||
"""
|
||||
@@ -34,6 +41,11 @@ class Place(Submittable, Taggable, Mapable):
|
||||
related_name='place_heros'
|
||||
)
|
||||
|
||||
level = models.IntegerField(
|
||||
default=5,
|
||||
choices=PLACE_LEVELS
|
||||
)
|
||||
|
||||
def get_hero_image(self):
|
||||
if self.hero:
|
||||
return self.hero
|
||||
|
Reference in New Issue
Block a user