# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models
from django.utils import timezone

from habits.models import Habit


class Action(models.Model):
    habit = models.ForeignKey(Habit)
    description = models.TextField(blank=True, null=True)
    timestamp = models.DateTimeField(default=timezone.now)

    class Meta:
        ordering = ['-timestamp', ]

    def __str__(self):
        return "{} on {}".format(self.habit, self.timestamp)

f55d9f216f0cb1f16dcf4c65d2abcf9bce2db84f
<mask token>


class Action(models.Model):
    <mask token>
    <mask token>
    <mask token>


    class Meta:
        ordering = ['-timestamp']
    <mask token>

<mask token>


class Action(models.Model):
    <mask token>
    <mask token>
    <mask token>


    class Meta:
        ordering = ['-timestamp']

    def __str__(self):
        return '{} on {}'.format(self.habit, self.timestamp)

<mask token>


class Action(models.Model):
    habit = models.ForeignKey(Habit)
    description = models.TextField(blank=True, null=True)
    timestamp = models.DateTimeField(default=timezone.now)


    class Meta:
        ordering = ['-timestamp']

    def __str__(self):
        return '{} on {}'.format(self.habit, self.timestamp)

from __future__ import unicode_literals
from django.db import models
from django.utils import timezone
from habits.models import Habit


class Action(models.Model):
    habit = models.ForeignKey(Habit)
    description = models.TextField(blank=True, null=True)
    timestamp = models.DateTimeField(default=timezone.now)


    class Meta:
        ordering = ['-timestamp']

    def __str__(self):
        return '{} on {}'.format(self.habit, self.timestamp)

# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models
from django.utils import timezone

from habits.models import Habit


class Action(models.Model):
    habit = models.ForeignKey(Habit)
    description = models.TextField(blank=True, null=True)
    timestamp = models.DateTimeField(default=timezone.now)

    class Meta:
        ordering = ['-timestamp', ]

    def __str__(self):
        return "{} on {}".format(self.habit, self.timestamp)
