diff options
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r-- | mediagoblin/db/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 02392792..e1b37aa0 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -237,6 +237,10 @@ class NonceTimestamp(Base): timestamp = Column(DateTime, nullable=False, primary_key=True) +def create_uuid(): + """ Creates a new uuid which is suitable for use in a URL """ + return base64.urlsafe_b64encode(uuid.uuid4().bytes).strip("=") + class MediaEntry(Base, MediaEntryMixin): """ TODO: Consider fetching the media_files using join |