Here"s an Error I have and I can't solve:
Cannot import name "File" from 'uploadapp.models'
The code below makes it better to understand.
Thanks in advance for your help.
from django.db import models
from .models import File
class File(models.Model):
file = models.FileField(blank=False, null=False)
def __str__(self):
return self.file.name
Fileinside the file where you define it. Remove thefrom .models import File.