diff options
author | Sam Wenham <sam@wenhams.co.uk> | 2019-04-19 22:52:54 +0100 |
---|---|---|
committer | Sam Wenham <sam@wenhams.co.uk> | 2019-04-19 22:52:54 +0100 |
commit | 768ec830377e7c99827812b2ed83cffad9764d50 (patch) | |
tree | f069b8ebc452437ebb09fca8f343be6e4e0e6cee /core | |
parent | 2f9870644b6a49f19c048dbf5057a85637254c8f (diff) | |
download | troggle-768ec830377e7c99827812b2ed83cffad9764d50.tar.gz troggle-768ec830377e7c99827812b2ed83cffad9764d50.tar.bz2 troggle-768ec830377e7c99827812b2ed83cffad9764d50.zip |
Updating caves and entrances is no longer nuclear!
Big overhaul of people processing, fullname added to the model
lastname is now names -1 unless you only have one (yes you Wookey)
this allows for Jon Arne Toft and Wookey to live it the same DB
names can now have html chars in them, this should be real unicode but that can
only happen when we go to Python 3!
Diffstat (limited to 'core')
-rw-r--r-- | core/models.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/models.py b/core/models.py index 223d447..f65efed 100644 --- a/core/models.py +++ b/core/models.py @@ -57,7 +57,7 @@ class TroggleModel(models.Model): class Meta: abstract = True -class TroggleImageModel(ImageModel): +class TroggleImageModel(models.Model): new_since_parsing = models.BooleanField(default=False, editable=False) def object_name(self): @@ -123,16 +123,13 @@ class ExpeditionDay(TroggleModel): class Person(TroggleModel): first_name = models.CharField(max_length=100) last_name = models.CharField(max_length=100) + fullname = models.CharField(max_length=200) is_vfho = models.BooleanField(help_text="VFHO is the Vereines für Höhlenkunde in Obersteier, a nearby Austrian caving club.", default=False) mug_shot = models.CharField(max_length=100, blank=True,null=True) blurb = models.TextField(blank=True,null=True) #href = models.CharField(max_length=200) orderref = models.CharField(max_length=200) # for alphabetic - - #the below have been removed and made methods. I'm not sure what the b in bisnotable stands for. - AC 16 Feb - #notability = models.FloatField() # for listing the top 20 people - #bisnotable = models.BooleanField(default=False) user = models.OneToOneField(User, null=True, blank=True) def get_absolute_url(self): return urlparse.urljoin(settings.URL_ROOT,reverse('person',kwargs={'first_name':self.first_name,'last_name':self.last_name})) |