from django.db import models

class Event(models.Model):
  when = models.DateTimeField(auto_now=True)
  what = models.TextField()

from django.db import models

class Event(models.Model):
  when = models.DateTimeField(auto_now=True)
  what = models.TextField()

  def time(self):
    return '{:%H:%M}'.format(self.when)

Return human-sensible time in Event
Return human-sensible time in Event

  from django.db import models
  
  class Event(models.Model):
    when = models.DateTimeField(auto_now=True)
    what = models.TextField()
  
+   def time(self):
+     return '{:%H:%M}'.format(self.when)
+ 
Return human-sensible time in Event
## Code Before:
from django.db import models

class Event(models.Model):
  when = models.DateTimeField(auto_now=True)
  what = models.TextField()

## Instruction:
Return human-sensible time in Event
## Code After:
from django.db import models

class Event(models.Model):
  when = models.DateTimeField(auto_now=True)
  what = models.TextField()

  def time(self):
    return '{:%H:%M}'.format(self.when)
