switch to jsonfield
This commit is contained in:
parent
1b27145ecb
commit
916fde4a4d
21
src/shop/migrations/0047_auto_20170522_1942.py
Normal file
21
src/shop/migrations/0047_auto_20170522_1942.py
Normal 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(),
|
||||||
|
),
|
||||||
|
]
|
|
@ -430,7 +430,7 @@ class CoinifyAPIRequest(CreatedUpdatedModel):
|
||||||
order = models.ForeignKey('shop.Order', related_name="coinify_api_requests", on_delete=models.PROTECT)
|
order = models.ForeignKey('shop.Order', related_name="coinify_api_requests", on_delete=models.PROTECT)
|
||||||
method = models.CharField(max_length=100)
|
method = models.CharField(max_length=100)
|
||||||
payload = JSONField()
|
payload = JSONField()
|
||||||
response = models.TextField()
|
response = JSONField()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return 'order %s api request %s' % (self.order.id, self.method)
|
return 'order %s api request %s' % (self.order.id, self.method)
|
||||||
|
|
Loading…
Reference in a new issue