summaryrefslogtreecommitdiffstats
path: root/core/models.py
diff options
context:
space:
mode:
authorSam Wenham <sam@wenhams.co.uk>2019-04-19 22:52:54 +0100
committerSam Wenham <sam@wenhams.co.uk>2019-04-19 22:52:54 +0100
commitb42249890e83fafdfd2f2918cd80f4621252f7ab (patch)
treef069b8ebc452437ebb09fca8f343be6e4e0e6cee /core/models.py
parentcc313246bb50fa8851fe65b1511101060206cd79 (diff)
downloadtroggle-b42249890e83fafdfd2f2918cd80f4621252f7ab.tar.gz
troggle-b42249890e83fafdfd2f2918cd80f4621252f7ab.tar.bz2
troggle-b42249890e83fafdfd2f2918cd80f4621252f7ab.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/models.py')
-rw-r--r--core/models.py7
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&uuml;r H&ouml;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}))