switch to jsonfield

This commit is contained in:
Thomas Steen Rasmussen 2017-05-22 19:42:20 +02:00
parent 1b27145ecb
commit 916fde4a4d
2 changed files with 22 additions and 1 deletions

View file

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-22 17:42
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('shop', '0046_coinifyapirequest_method'),
]
operations = [
migrations.AlterField(
model_name='coinifyapirequest',
name='response',
field=django.contrib.postgres.fields.jsonb.JSONField(),
),
]

View file

@ -430,7 +430,7 @@ class CoinifyAPIRequest(CreatedUpdatedModel):
order = models.ForeignKey('shop.Order', related_name="coinify_api_requests", on_delete=models.PROTECT)
method = models.CharField(max_length=100)
payload = JSONField()
response = models.TextField()
response = JSONField()
def __str__(self):
return 'order %s api request %s' % (self.order.id, self.method)