Source

django_cookie_law_nl / cookie_law / models.py

import datetime

from django.utils.translation import ugettext_lazy as _
from django.db import models


class CookieUser(models.Model):
    address = models.CharField(_('IP Adres'), max_length=39)
    agent = models.CharField(_('User agent'), max_length=250)
    date = models.DateTimeField(_('Datum'), default=datetime.datetime.now)

    class Meta:
        verbose_name = _('cookie gebruiker')
        verbose_name = _('cookie gebruikers')

    def __unicode__(self):
        return self.address