"""Django models utilities"""

# Django
from django.db import models

class CRideModel(models.Model):
    """Comparte Ride Base Model

    CRide model abstract class, other models need
    to inherit this base class. This class provides
    the following attributes:
        + created (DateTime): Store the datetime of the objects was created
        + modified (DateTime): Store the last datetime of the objects was modified
    """

    created = models.DateTimeField(
        'created at',
        auto_now_add=True,
        help_text='Date time on wich the object was created.'
    )

    modified = models.DateTimeField(
        'modified at',
        auto_now=True,
        help_text='Date time on wich the object was modified.'
    )

    class Meta:
        """Meta options"""

        abstract = True

        get_latest_by = 'created'

        ordering = ['-created', '-modified']

"""Django models utilities"""

# Django
from django.db import models

class CRideModel(models.Model):
    """Comparte Ride Base Model

    CRide model abstract class, other models need
    to inherit this base class. This class provides
    the following attributes:
        + created (DateTime): Store the datetime of the objects was created
        + modified (DateTime): Store the last datetime of the objects was modified
    """

    created = models.DateTimeField(
        'created at',
        auto_now_add=True,
        help_text='Date time on wich the object was created.'
    )

    modified = models.DateTimeField(
        'modified at',
        auto_now=True,
        help_text='Date time on wich the object was modified.'
    )

    class Meta:
        """Meta options"""

        abstract = True

        get_latest_by = 'created'

        ordering = ['-created', '-modified']

Django models utilities # Django Comparte Ride Base Model      CRide model abstract class, other models need     to inherit this base class. This class provides     the following attributes:         + created (DateTime): Store the datetime of the objects was created         + modified (DateTime): Store the last datetime of the objects was modified Meta options