Commits

Łukasz Langa  committed 77bdf72

towards 0.9.1: models are time trackable now

  • Participants
  • Parent commits 6e5e120
  • Branches fork

Comments (0)

Files changed (3)

 Then the ``powerdns`` database::
 
   $ python manage.py syncdb --database=powerdns
-  $ python manage.py migrate --database==powerdns
+  $ python manage.py migrate --database==powerdns powerdns
 
 Note that the ``powerdns`` database will maintain its own separate South
 migration history table. This is especially helpful if your connecting several
 Django projects to a single PowerDNS database.
 
+Also note that due to `South limitations
+<http://south.aeracode.org/ticket/370>`_, ``migrate`` will create all powerdns
+tables also in the default database. This is harmless, even though creates some
+clutter.
+
 Change Log
 ----------
 
 
 * Forward/reverse domain filter (requires Django 1.4+)
 
+* The ``0002`` database migration in 0.9.0 was incomplete, this is now fixed
+
 0.9.0
 ~~~~~
 

File powerdns/models.py

 from django.core.validators import validate_ipv4_address
 from django.db import models
 from django.utils.translation import ugettext_lazy as _
+from lck.django.common.models import TimeTrackable
 
 
 BASIC_RECORD_TYPES = (
         )
 
 
-class Domain(models.Model):
+class Domain(TimeTrackable):
     '''
     PowerDNS domains
     '''
         self.name = self.name.lower()
 
 
-class Record(models.Model):
+class Record(TimeTrackable):
     '''
     PowerDNS DNS records
     '''
         super(Record, self).save(*args, **kwargs)
 
 
-class SuperMaster(models.Model):
+class SuperMaster(TimeTrackable):
     '''
     PowerDNS DNS Servers that should be trusted to push new domains to us
     '''
         return self.ip
 
 
-class DomainMetadata(models.Model):
+class DomainMetadata(TimeTrackable):
     domain = models.ForeignKey(Domain, verbose_name=_("domain"))
     kind = models.CharField(_("kind"), max_length=15)
     content = models.TextField(_("content"), blank=True, null=True)
         return unicode(self.domain)
 
 
-class CryptoKey(models.Model):
+class CryptoKey(TimeTrackable):
     domain = models.ForeignKey(
         Domain, verbose_name=_("domain"), blank=True, null=True,
         on_delete=models.SET_NULL,
 
 setup(
     name = 'django-powerdns-dnssec',
-    version = '0.9.0',
+    version = '0.9.1',
     url = 'http://bitbucket.org/ambv/django-powerdns/',
     license = 'BSD',
     description = 'PowerDNS administration app for Django',
     install_requires = [
         'Django>=1.3.4',
         'ipaddr>=2.1.7',
-        'lck.django>=0.7.14',
+        'lck.django>=0.8.0',
     ],
     zip_safe = False,  # if only because of the readme file
 )