d21d8be018
Move this model into the devel/ application, and move the PGPKeyField which is used only by these models into the application as well. This involves updating some old migrations along the way to ensure we don't reference a field class that no longer exists. Signed-off-by: Dan McGee <dan@archlinux.org>
16 lines
389 B
Python
16 lines
389 B
Python
from django.db import models
|
|
|
|
|
|
class PositiveBigIntegerField(models.BigIntegerField):
|
|
_south_introspects = True
|
|
|
|
def get_internal_type(self):
|
|
return "BigIntegerField"
|
|
|
|
def formfield(self, **kwargs):
|
|
defaults = { 'min_value': 0 }
|
|
defaults.update(kwargs)
|
|
return super(PositiveBigIntegerField, self).formfield(**defaults)
|
|
|
|
# vim: set ts=4 sw=4 et:
|