forked from 0x2620/pandora
keep a log of changes
This commit is contained in:
parent
caf8630d61
commit
82c83c1309
12 changed files with 61 additions and 3 deletions
0
pandora/changelog/__init__.py
Normal file
0
pandora/changelog/__init__.py
Normal file
13
pandora/changelog/models.py
Normal file
13
pandora/changelog/models.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
from __future__ import division, with_statement
|
||||
from django.db import models
|
||||
from ox.django import fields
|
||||
|
||||
class Changelog(models.Model):
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
type = models.CharField(max_length=255, db_index=True)
|
||||
value = fields.DictField(default={})
|
||||
|
||||
def __unicode__(self):
|
||||
return u'%s %s' %(self.type, self.created)
|
||||
16
pandora/changelog/tests.py
Normal file
16
pandora/changelog/tests.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
This file demonstrates writing tests using the unittest module. These will pass
|
||||
when you run "manage.py test".
|
||||
|
||||
Replace this with more appropriate tests for your application.
|
||||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class SimpleTest(TestCase):
|
||||
def test_basic_addition(self):
|
||||
"""
|
||||
Tests that 1 + 1 always equals 2.
|
||||
"""
|
||||
self.assertEqual(1 + 1, 2)
|
||||
1
pandora/changelog/views.py
Normal file
1
pandora/changelog/views.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Create your views here.
|
||||
Loading…
Add table
Add a link
Reference in a new issue