モデルにManyToManyFieldがあり、使用可能なすべてのアプリケーションを選択肢として持つことが可能ですか?利用可能なapp_labelsのDjango多対多のフィールド
のは
はその後、私のmodels.pyで、私はこのモデルclass IPAddreses(models.Model):
ip = models.GenericIPAddressField()
apps = models.ManyToManyField(ContentType, blank=True)
# The apps field should be the choices of the avialable apps on the settings.py
ことが可能ですを持って、私は私のsettings.pyにINSTALLED_APPSにこれらのアプリを持っているとしましょうか?
あなたのユースケースは何ですか? – Udi
すべてのアプリ認証でIPAddressホワイトリストを有効にするには –
も参照してください。https://docs.djangoproject.com/en/1.10/topics/auth/default/#programmatically-creating-permissions – Udi