Added services missing migrations

This commit is contained in:
Marc Aymerich 2016-04-27 13:32:38 +00:00
parent 0684b00963
commit e8b0b639ee
4 changed files with 7 additions and 8 deletions

View File

@ -13,6 +13,6 @@ class HistoryConfig(AppConfig):
LogEntry, verbose_name='History', verbose_name_plural='History', icon='History.png'
)
# prevent loosing creation time on log entry edition
action_time = LogEntry._meta.get_field_by_name('action_time')[0]
action_time.auto_now = False
action_time.auto_now_add = True
# action_time = LogEntry._meta.get_field_by_name('action_time')[0]
# action_time.auto_now = False
# action_time.auto_now_add = True

View File

@ -296,8 +296,7 @@ class MetricStorage(models.Model):
""" Stores metric state for future billing """
order = models.ForeignKey(Order, verbose_name=_("order"), related_name='metrics')
value = models.DecimalField(_("value"), max_digits=16, decimal_places=2)
created_on = models.DateField(_("created"), auto_now_add=True)
created_on.editable = True
created_on = models.DateField(_("created"), auto_now_add=True, editable=True)
# TODO time field?
updated_on = models.DateTimeField(_("updated"))

View File

@ -1,13 +1,13 @@
from django.apps import apps
from django.http import Http404
from django.contrib.admin.utils import unquote
from django.core.exceptions import PermissionDenied
from django.db.models import get_model
from django.shortcuts import get_object_or_404
from django.views.static import serve
def serve_private_media(request, app_label, model_name, field_name, object_id, filename):
model = get_model(app_label, model_name)
model = apps.get_model(app_label, model_name)
if model is None:
raise Http404('')
instance = get_object_or_404(model, pk=unquote(object_id))

View File

@ -13,7 +13,7 @@ Pygments==1.6
django-filter==0.7
jsonfield==0.9.22
python-dateutil==2.2
passlib==1.6.5
https://github.com/glic3rinu/passlib/archive/master.zip
django-iban==0.3.0
requests
phonenumbers