QKJIN

Results 11 comments of QKJIN

@soundmaking Thanks for your help. It is work. For me, there are my codes. (1) models.py ``` class MyUser(User): __tablename__ = "ab_user" def is_admin(self): if 'Admin' in [r.name for r...

There is an error about if permission_name in [p.name for p in role.permissions]: , because p has no attribution name. I change them to below. But it still can not...

I checked the original code about permission_view. And changed the codes into below. They can work. ``` def has_permission(self, permission_name, view_menu_name): for role in self.roles: for ps in role.permissions: if...

@ThomasP0815 Thank you very much. It works when I override this method. I changed the labels in db table, then refresh the modelview list page, those columns lables are changed....

I tried to override edit and delete method. It can work. ``` @expose("/delete/", methods=["GET", "POST"]) @has_access def delete(self, pk): item = self.datamodel.get(pk) if (is_right(current_user, item.created_by): # Maintains compatibility but refuses...

I almost complete this func. When I add a new column and re-mapping the new column to model attrs, then I need to refresh the datamodel of this related modelview....

可能是db映射的目录没有设置好,修改一下docker-compose.yml里的目录映射,可以设置为docker默认的目录,或者是有权限访问的目录。我第一次安装就是用默认的/data/spug/mysql:/var/lib/mysql,也是没有成功,因为我发现并没有成功创建/data/spug/mysql目录,我用的是mac,可能是权限的原因,我修改了这个目录到我个人目录下,就成功了。

I am using a mac pro with m2. I put this code `device = "mps" if torch.backends.mps.is_available() else "cpu" ` before preload_models(). Then I got voice within 2 mins with...

@ludos1978 Yes, it's right. I generate several sounds. The speeds are all different. @MSchmidt You are right. It's just a variable. It's not used correctly. I'm still searching how to...

It seems I find way to fix it. Put below code before $.post(url) in the template. ``` var csrf_token = "{{ csrf_token() }}"; $.ajaxSetup({ beforeSend: function(xhr, settings) { if (!/^(GET|HEAD|OPTIONS|TRACE)$/i.test(settings.type)...