# Path: twobuntu/utils.py
# def uuid6():
#     """
#     Generate a UUID and truncate it to six characters.
#     """
#     return uuid()[:6]


from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from twobuntu.utils import uuid6



@python_2_unicode_compatible
class ShortURL(models.Model):
    """
    A short URL for redirection.
    """

    key = models.CharField(
        max_length=6,
        primary_key=True,

# Path: twobuntu/utils.py
# def uuid6():
#     """
#     Generate a UUID and truncate it to six characters.
#     """
#     return uuid()[:6]


# Path: twobuntu/shorturls/models.py
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from twobuntu.utils import uuid6




@python_2_unicode_compatible
class ShortURL(models.Model):
    """
    A short URL for redirection.
    """

    key = models.CharField(
        max_length=6,
        primary_key=True,

        default=uuid6,