我创建了一个模型类Admin、Entrepreneur、CustomUser和两个函数,它们首先将数据添加到这些类中,同时我还定义了两个在CostumUser类中添加数据时运行的接收方
from django.contrib.auth.models import *from django.db.models.signals import post_saveAdmin.objects.save()
if instance.user_type
Draw.MolsToGridImage(subms,molsPerRow=4,subImgSize=(200,200),legends=[x.GetProp("_Name") for x in subms]) img=Draw.MolsToGridImage(ms, molsPerRow=10)
img.save('Pic.png') 在这两种情况下,教程和我自
我希望将用户创建的事件数量保存到用户配置文件中,这样即使删除了事件,记录也会保留在用户配置文件中。event/event_form.html'
self.object = form.save() # If I don't use this statement it does not save to database.But It gives me the above error