forked from expo/troggle
Remove PHOTOS_ROOT and DPhoto class
This commit is contained in:
@@ -780,31 +780,32 @@ class QM(TroggleModel):
|
||||
def wiki_link(self):
|
||||
return u"%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)
|
||||
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)
|
||||
#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)
|
||||
#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'
|
||||
# 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 __unicode__(self):
|
||||
return self.caption
|
||||
# def __unicode__(self):
|
||||
# return self.caption
|
||||
|
||||
scansFileStorage = FileSystemStorage(location=settings.SURVEY_SCANS, base_url=settings.SURVEYS_URL)
|
||||
def get_scan_path(instance, filename):
|
||||
|
||||
Reference in New Issue
Block a user