2015-03-30 07:25:28 +00:00
|
|
|
# -*- coding:utf-8 -*-
|
|
|
|
|
from __future__ import absolute_import, unicode_literals
|
|
|
|
|
|
2013-03-02 05:55:00 +00:00
|
|
|
from django.db import models
|
2015-03-30 07:25:28 +00:00
|
|
|
from django.utils.encoding import force_text, python_2_unicode_compatible
|
|
|
|
|
|
2013-03-02 05:55:00 +00:00
|
|
|
|
2015-03-30 07:25:28 +00:00
|
|
|
@python_2_unicode_compatible
|
2013-03-02 05:55:00 +00:00
|
|
|
class KeyMap(models.Model):
|
|
|
|
|
key = models.CharField(max_length=40, unique=True)
|
|
|
|
|
value = models.CharField(max_length=100)
|
2015-04-06 13:31:23 +00:00
|
|
|
accessed_on = models.DateTimeField(auto_now=True)
|
2013-03-02 05:55:00 +00:00
|
|
|
|
2015-03-30 07:25:28 +00:00
|
|
|
def __str__(self):
|
|
|
|
|
return force_text("%s => %s" % (self.key, self.value))
|