From b42249890e83fafdfd2f2918cd80f4621252f7ab Mon Sep 17 00:00:00 2001 From: Sam Wenham Date: Fri, 19 Apr 2019 22:52:54 +0100 Subject: 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! --- core/models.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'core/models.py') 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})) -- cgit v1.2.3