Hi. This is something that only occurs in the shell environment, not in the web. If I have this model:
class Phone_App(models.Model):
phone= models.ForeignKey(Phone, on_delete=models.CASCADE)
app_name = models.ForeignKey(App, on_delete=models.CASCADE)
downloads = models.IntegerField(default=0, editable=False)
apk_file = ContentTypeRestrictedFileField(upload_to=get_upload_path,
content_types=['application/vnd.android.package-archive', ],
max_upload_size=214958080,
max_length=500)
class Phone(models.Model):
phone_name = models.CharField(max_length=200, null=False, blank=False)
version = models.CharField(max_length=20, blank=True, null=True)