Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
1605 Lượt xem

Hello,

For a project i need to implement variable inside the XML view files of an inline form.

Those variable are stored inside .py files as either constant inside an array or inside a configuration field. I was wondering how i should do that.

Also some of those variable are part of a text i need to concatanate so i can't just throw them inside the XML file.

Thanks

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I'm creating an inline_form ( inside the data folder and  inside the view folder)​, and the variable i'm passing are strings that i get from different .py file inside the plugin such as the payment_provider.py files or a constant.py.


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Hippolyte,

Could you elaborate on which variable and inline forms you are discussing?

You may want to do something like in payment_stripe​ where a serialized dict is set as attribute of a div​ node in Stripe's inline form.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 24
1852
1
thg 4 24
2378
1
thg 7 25
1561
0
thg 4 24
1157
3
thg 3 24
2187