# Path: sectesting/streetart/models/base.py
# class BaseStreetArtModel(models.Model):
#     """
#     This is a base model for all models used by the Street Art project.
#     """
# 
#     uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
#     created = models.DateTimeField(auto_now_add=True)
# 
#     class Meta:
#         ordering = ("created",)
#         abstract = True
# 
#     def __repr__(self):
#         return "<%s - %s>" % (self.__class__.__name__, self.uuid)


from django.db import models
from django.conf import settings
from lib import S3Helper
from .base import BaseStreetArtModel
        return "/view-post/%s/" % (self.uuid,)

    # Properties

    @property
    def coordinates_string(self):
        """
        Get a string representing the coordinates where this photograph was taken.
        :return: a string representing the coordinates where this photograph was taken.
        """
        return "%s, %s" % (self.latitude, self.longitude)

    @property
    def has_coordinates(self):
        """
        Get whether or not this post has coordinates associated with it.
        :return: whether or not this post has coordinates associated with it.
        """
        return self.latitude is not None and self.longitude is not None

    @property
    def s3_url(self):
        """
        Get a signed URL to retrieve the referenced image from Amazon S3.
        :return: a signed URL to retrieve the referenced image from Amazon S3.
        """
        s3_helper = S3Helper.instance()
        return s3_helper.get_signed_url_for_key(key=str(self.uuid), bucket=settings.AWS_S3_BUCKET)



# Path: sectesting/streetart/models/base.py
# class BaseStreetArtModel(models.Model):
#     """
#     This is a base model for all models used by the Street Art project.
#     """
# 
#     uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
#     created = models.DateTimeField(auto_now_add=True)
# 
#     class Meta:
#         ordering = ("created",)
#         abstract = True
# 
#     def __repr__(self):
#         return "<%s - %s>" % (self.__class__.__name__, self.uuid)


# Path: sectesting/streetart/models/post.py
from django.db import models
from django.conf import settings
from lib import S3Helper
from .base import BaseStreetArtModel

        return "/view-post/%s/" % (self.uuid,)

    # Properties

    @property
    def coordinates_string(self):
        """
        Get a string representing the coordinates where this photograph was taken.
        :return: a string representing the coordinates where this photograph was taken.
        """
        return "%s, %s" % (self.latitude, self.longitude)

    @property
    def has_coordinates(self):
        """
        Get whether or not this post has coordinates associated with it.
        :return: whether or not this post has coordinates associated with it.
        """
        return self.latitude is not None and self.longitude is not None

    @property
    def s3_url(self):
        """
        Get a signed URL to retrieve the referenced image from Amazon S3.
        :return: a signed URL to retrieve the referenced image from Amazon S3.
        """
        s3_helper = S3Helper.instance()
        return s3_helper.get_signed_url_for_key(key=str(self.uuid), bucket=settings.AWS_S3_BUCKET)



class StreetArtPostVote(BaseStreetArtModel):