Commit 97a5a111 by Dudás Ádám

storage: use sizefield for disk size

fixes !5
parent e5e57a40
......@@ -223,6 +223,7 @@ THIRD_PARTY_APPS = (
'django_tables2',
'crispy_forms',
'djcelery',
'sizefield',
)
# Apps specific for this project go here.
......
......@@ -4,12 +4,12 @@ import logging
import uuid
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_delete
from django.utils.translation import ugettext_lazy as _
from model_utils.models import TimeStampedModel
from sizefield.models import FileSizeField
from manager import storage_manager
import tasks
logger = logging.getLogger(__name__)
......@@ -46,7 +46,7 @@ class Disk(TimeStampedModel):
filename = models.CharField(max_length=256, verbose_name=_('filename'))
datastore = models.ForeignKey(DataStore)
type = models.CharField(max_length=10, choices=TYPES)
size = models.IntegerField()
size = FileSizeField()
base = models.ForeignKey('self', blank=True, null=True,
related_name='derivatives')
ready = models.BooleanField(default=False)
......
......@@ -5,7 +5,9 @@ django-braces==1.2.2
django-celery==3.0.23
django-crispy-forms==1.4.0
django-model-utils==1.4.0
django-sizefield==0.4
django-tables2==0.14.0
django-taggit==0.10a1
logutils==0.3.3
netaddr==0.7.10
South==0.8.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment