lines-num-old"> 150
-        if extra_attrs:
151
-            attrs.update(extra_attrs)
152
-        return attrs
153
-
154
-    def render(self, name, value, attrs=None, renderer=None):
155
-        if value is None:
156
-            value = ''
157
-        final_attrs = self.build_attrs(self.attrs, attrs, name=name)
158
-
159
-        params = ('simditor/widget.html', {
160
-            'final_attrs': flatatt(final_attrs),
161
-            'value': conditional_escape(force_text(value)),
162
-            'id': final_attrs['id'],
163
-            'config': JSON_ENCODE(self.config)
164
-        })
165
-
166
-        if renderer is None and IS_NEW_WIDGET:
167
-            renderer = get_default_renderer()
168
-
169
-        data = renderer.render(*params) if IS_NEW_WIDGET else render_to_string(*params)
170
-
171
-        return mark_safe(data)

+ 7 - 1
pay/views.py

@@ -15,7 +15,7 @@ import json
15 15
 from functools import reduce
16 16
 
17 17
 from account.models import UserInfo
18
-from goods.models import PackInfo, PackGoodsInfo, GoodsInfo
18
+from goods.models import PackInfo, PackGoodsInfo, GoodsInfo, PackGoodsSaleInfo
19 19
 from kol.models import KOLInfo
20 20
 from pay.models import OrderInfo
21 21
 from utils.error.errno_utils import (PackStatusCode, KOLStatusCode, PackGoodsStatusCode, OrderStatusCode, UserStatusCode, 
@@ -128,6 +128,12 @@ def order_paid_success(order):
128 128
     order.pay_status = OrderInfo.PAID
129 129
     order.paid_at = tc.utc_datetime()
130 130
     order.save()
131
+    
132
+    PackGoodsSaleInfo.create(
133
+        pack_id=order.pack_id,
134
+        user_id=order.user_id,
135
+        saleinfo=order.goods_info
136
+    )
131 137
 
132 138
 
133 139
 def order_paid_fail(order):

kodo - Gogs: Go Git Service

Nav apraksta

Brightcells: cb207c5fcf Add field dupload for SaleclerkSubmitLogInfo 8 gadi atpakaļ
account e2ff1d264d test_user 8 gadi atpakaļ
api e47aa7f8c4 Add field test_user 8 gadi atpakaļ
box 018d52f61d Update package django_xxx 8 gadi atpakaļ
docs 212e3994d1 MP verify file 8 gadi atpakaļ
geo 018d52f61d Update package django_xxx 8 gadi atpakaļ
group 597ee33ba6 Pai2 => Kodo 8 gadi atpakaļ
integral cb207c5fcf Add field dupload for SaleclerkSubmitLogInfo 8 gadi atpakaļ
kodo 597ee33ba6 Pai2 => Kodo 8 gadi atpakaļ
mch 549e497a0a test_user 8 gadi atpakaļ
message 597ee33ba6 Pai2 => Kodo 8 gadi atpakaļ
miniapp 018d52f61d Update package django_xxx 8 gadi atpakaļ
operation 597ee33ba6 Pai2 => Kodo 8 gadi atpakaļ
page cb207c5fcf Add field dupload for SaleclerkSubmitLogInfo 8 gadi atpakaļ
pay 018d52f61d Update package django_xxx 8 gadi atpakaļ
photo 597ee33ba6 Pai2 => Kodo 8 gadi atpakaļ
product 018d52f61d Update package django_xxx 8 gadi atpakaļ
server 018d52f61d Update package django_xxx 8 gadi atpakaļ
utils 597ee33ba6 Pai2 => Kodo 8 gadi atpakaļ
website 597ee33ba6 Pai2 => Kodo 8 gadi atpakaļ
.editorconfig 4defb80fdc gogs first init 10 gadi atpakaļ
.gitignore 2f29afecbd modify version in operation 10 gadi atpakaļ
.isort.cfg afcdf74a49 add api group_data_api 10 gadi atpakaļ
TODO.md d31ffaa118 Update TODO 9 gadi atpakaļ
check.sh 95c1d32792 put isort and pep8 in check.sh 10 gadi atpakaļ
isort.sh 6626af8a8d add api lensman_wx_authorize_api 10 gadi atpakaļ
manage.py 597ee33ba6 Pai2 => Kodo 8 gadi atpakaļ
pep8.sh 511533855d Change oauth to use http 8 gadi atpakaļ
requirements.txt cb207c5fcf Add field dupload for SaleclerkSubmitLogInfo 8 gadi atpakaļ
sysctl.sh 7bb638568e Add sysctl.sh script 8 gadi atpakaļ