Exemple #1
0
    def exif_table(self):
        from trackerutils import div

        ctags = div(klass="ctagzone", contents="".join([tag.tag.clink() for tag in self.tags.all()]))
        photoset = div(klass="photosetzone", contents="".join([tag.tag.photosetlink() for tag in self.tags.all()]))
        cspot = ""
        if self.photospot:
            cspot = self.photospot.clink()
        cspot = div(klass="cspotzone", contents=cspot or " ")
        if self.resolutionx and self.resolutiony:
            size = "%dx%d" % (self.resolutionx, self.resolutiony)
        else:
            size = ""
        dat = (
            ("camera", self.camera),
            ("iso", self.iso),
            ("mm", self.mm),
            ("size", size),
            ("filesize", humanize_size(self.filesize)),
            ("tags clink", ctags),
            ("photoset", photoset),
            ("photospot clink", cspot),
        )
        res = mktable(dat, skip_false=True)
        return res
Exemple #2
0
    def links_table(self):
        from trackerutils import div

        # vtags=div(klass='vtagzone',contents=', '.join([tag.tag.vlink() for tag in self.tags.all()]))
        vspot = ""
        if self.photospot:
            vspot = self.photospot.vlink()

        vspot = div(klass="vspotzone", contents=vspot or " ")
        data = (("photospot vlink", vspot),)  # ('tags vlink',vtags),
        res = mktable(data, skip_false=False)
        return res