我正在尝试将meta = true的模型类添加到另一个抽象类中。例如,
#include<iostream>
#include<fstream>
#include<Eigen>
using Eigen::VectorXd;
using Eigen::IOFormat;
using Eigen::StreamPrecision;
int main()
{
std::ofstream myfile1;
VectorXd en(1000);
std::string energyname = "Energies.txt";
myfile1.open(energyname);
IOFormat column_transpose_format(StreamPrecision, 0, " ", " ");
for (int i = 0; i < 200; i++)
{
for (int j = 0; j < 1000; j++)
{
en(j) = 10;
}
myfile1 << en.format(column_transpose_format) << std::endl;
}
}
在Django管理员中,我能够看到嵌入式字段及其对应的复选框。我可以为布尔字段HRCT(从X类嵌入)添加/更新值,但不能将值/更新保存在从Y类嵌入到X类的字段中。