Added services missing migrations
This commit is contained in:
parent
0684b00963
commit
e8b0b639ee
|
@ -13,6 +13,6 @@ class HistoryConfig(AppConfig):
|
||||||
LogEntry, verbose_name='History', verbose_name_plural='History', icon='History.png'
|
LogEntry, verbose_name='History', verbose_name_plural='History', icon='History.png'
|
||||||
)
|
)
|
||||||
# prevent loosing creation time on log entry edition
|
# prevent loosing creation time on log entry edition
|
||||||
action_time = LogEntry._meta.get_field_by_name('action_time')[0]
|
# action_time = LogEntry._meta.get_field_by_name('action_time')[0]
|
||||||
action_time.auto_now = False
|
# action_time.auto_now = False
|
||||||
action_time.auto_now_add = True
|
# action_time.auto_now_add = True
|
||||||
|
|
|
@ -296,8 +296,7 @@ class MetricStorage(models.Model):
|
||||||
""" Stores metric state for future billing """
|
""" Stores metric state for future billing """
|
||||||
order = models.ForeignKey(Order, verbose_name=_("order"), related_name='metrics')
|
order = models.ForeignKey(Order, verbose_name=_("order"), related_name='metrics')
|
||||||
value = models.DecimalField(_("value"), max_digits=16, decimal_places=2)
|
value = models.DecimalField(_("value"), max_digits=16, decimal_places=2)
|
||||||
created_on = models.DateField(_("created"), auto_now_add=True)
|
created_on = models.DateField(_("created"), auto_now_add=True, editable=True)
|
||||||
created_on.editable = True
|
|
||||||
# TODO time field?
|
# TODO time field?
|
||||||
updated_on = models.DateTimeField(_("updated"))
|
updated_on = models.DateTimeField(_("updated"))
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
from django.apps import apps
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.contrib.admin.utils import unquote
|
from django.contrib.admin.utils import unquote
|
||||||
from django.core.exceptions import PermissionDenied
|
from django.core.exceptions import PermissionDenied
|
||||||
from django.db.models import get_model
|
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.views.static import serve
|
from django.views.static import serve
|
||||||
|
|
||||||
|
|
||||||
def serve_private_media(request, app_label, model_name, field_name, object_id, filename):
|
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:
|
if model is None:
|
||||||
raise Http404('')
|
raise Http404('')
|
||||||
instance = get_object_or_404(model, pk=unquote(object_id))
|
instance = get_object_or_404(model, pk=unquote(object_id))
|
||||||
|
|
|
@ -13,7 +13,7 @@ Pygments==1.6
|
||||||
django-filter==0.7
|
django-filter==0.7
|
||||||
jsonfield==0.9.22
|
jsonfield==0.9.22
|
||||||
python-dateutil==2.2
|
python-dateutil==2.2
|
||||||
passlib==1.6.5
|
https://github.com/glic3rinu/passlib/archive/master.zip
|
||||||
django-iban==0.3.0
|
django-iban==0.3.0
|
||||||
requests
|
requests
|
||||||
phonenumbers
|
phonenumbers
|
||||||
|
|
Loading…
Reference in New Issue