修改APP的名称:

# coding:utf-8

from django.apps import AppConfig
import os

default_app_config = 'repository.RepositoryConfig'

VERBOSE_APP_NAME = u"报障系统"


def get_current_app_name(_file):
    return os.path.split(os.path.dirname(_file))[-1]


class RepositoryConfig(AppConfig):
    name = get_current_app_name(__file__)
    verbose_name = VERBOSE_APP_NAME

修改表的名称:

class Permission2Action(models.Model):
    p = models.ForeignKey(Permission,on_delete=models.CASCADE)
    a = models.ForeignKey(Action,on_delete=models.CASCADE)

    class Meta:
        verbose_name_plural = "权限表"

    def __str__(self):
        return "{0}-{1}:-{2}?t={3}".format(self.p.caption,self.a.caption,self.p.url,self.a.code)

  

 

相关文章:

  • 2021-08-04
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
  • 2021-08-01
  • 2021-10-10
猜你喜欢
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-11-30
  • 2022-02-01
相关资源
相似解决方案