summaryrefslogtreecommitdiffstats
path: root/core/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/models.py')
-rw-r--r--core/models.py44
1 files changed, 1 insertions, 43 deletions
diff --git a/core/models.py b/core/models.py
index 3a5103e..42219e7 100644
--- a/core/models.py
+++ b/core/models.py
@@ -148,7 +148,7 @@ class Person(TroggleModel):
return "%s %s" % (self.first_name, self.last_name)
return self.first_name
-
+
def notability(self):
notability = Decimal(0)
max_expo_val = 0
@@ -172,15 +172,6 @@ class Person(TroggleModel):
return self.personexpedition_set.order_by('-expedition')[0]
def last(self):
return self.personexpedition_set.order_by('expedition')[0]
-
- #def Sethref(self):
- #if self.last_name:
- #self.href = self.first_name.lower() + "_" + self.last_name.lower()
- #self.orderref = self.last_name + " " + self.first_name
- #else:
- # self.href = self.first_name.lower()
- #self.orderref = self.first_name
- #self.notability = 0.0 # set temporarily
class PersonExpedition(TroggleModel):
"""Person's attendance to one Expo
@@ -412,12 +403,10 @@ class Cave(TroggleModel):
url = models.CharField(max_length=200,blank=True,null=True)
filename = models.CharField(max_length=200)
-
#class Meta:
# unique_together = (("area", "kataster_number"), ("area", "unofficial_number"))
# FIXME Kataster Areas and CUCC defined sub areas need seperating
-
#href = models.CharField(max_length=100)
class Meta:
@@ -791,33 +780,6 @@ class QM(TroggleModel):
def wiki_link(self):
return "%s%s%s" % ('[[QM:',self.code(),']]')
-#photoFileStorage = FileSystemStorage(location=settings.PHOTOS_ROOT, base_url=settings.PHOTOS_URL)
-#class DPhoto(TroggleImageModel):
- #caption = models.CharField(max_length=1000,blank=True,null=True)
- #contains_logbookentry = models.ForeignKey(LogbookEntry,blank=True,null=True)
- #contains_person = models.ManyToManyField(Person,blank=True,null=True)
- # replace link to copied file with link to original file location
- #file = models.ImageField(storage=photoFileStorage, upload_to='.',)
- #is_mugshot = models.BooleanField(default=False)
- #contains_cave = models.ForeignKey(Cave,blank=True,null=True)
- #contains_entrance = models.ForeignKey(Entrance, related_name="photo_file",blank=True,null=True)
- #nearest_survey_point = models.ForeignKey(SurveyStation,blank=True,null=True)
- #nearest_QM = models.ForeignKey(QM,blank=True,null=True)
- #lon_utm = models.FloatField(blank=True,null=True)
- #lat_utm = models.FloatField(blank=True,null=True)
-
- # class IKOptions:
- # spec_module = 'core.imagekit_specs'
- # cache_dir = 'thumbs'
- # image_field = 'file'
-
- #content_type = models.ForeignKey(ContentType)
- #object_id = models.PositiveIntegerField()
- #location = generic.GenericForeignKey('content_type', 'object_id')
-
- # def __str__(self):
- # return self.caption
-
scansFileStorage = FileSystemStorage(location=settings.SURVEY_SCANS, base_url=settings.SURVEYS_URL)
def get_scan_path(instance, filename):
year=instance.survey.expedition.year
@@ -837,10 +799,6 @@ class ScannedImage(TroggleImageModel):
lon_utm = models.FloatField(blank=True,null=True)
lat_utm = models.FloatField(blank=True,null=True)
- class IKOptions:
- spec_module = 'core.imagekit_specs'
- cache_dir = 'thumbs'
- image_field = 'file'
#content_type = models.ForeignKey(ContentType)
#object_id = models.PositiveIntegerField()
#location = generic.GenericForeignKey('content_type', 'object_id')