我有三种型号 1)程序
> gsub('(?!theta\\[[:digit:]])', '', columnNames, perl = TRUE)
Error in gsub("(?!theta\\[[:digit:]])", "", columnNames, perl = TRUE) :
invalid regular expression '(?!theta\[[:digit:]])'
In addition: Warning message:
In gsub("(?!theta\\[[:digit:]])", "", columnNames, perl = TRUE) :
PCRE pattern compilation error
'POSIX named classes are supported only within a class'
at '[:digit:]])'
2)分支
class Programme(models.Model):
name = models.CharField(max_length=50 , unique=True)
3)方案
class Branch(models.Model):
name = models.CharField(max_length=50, unique=True)
programme = models.ForeignKey(
'Programme', related_name='branches', on_delete=models.CASCADE)
我想为链接的下拉列表创建序列化器和视图集 方案的选择将取决于过滤的选择 1)程序选择 2)选择分支 3)方案选择
任何人都知道如何使用Djangorestframework做到这一点