Django : Unsupported format character '''

309 Views Asked by At

I add this model to my models.py

class Documents(models.Model):
    id_doc = models.AutoField(primary_key=True, unique=True)
    name = models.CharField(max_length=1024, verbose_name='Nom du document')
    path = models.ImageField(upload_to="files/", blank=True, null=True, verbose_name="Chemin vers le fichier")

    class Meta:
        db_table = u'documents'
        verbose_name = u'Document'
        verbose_name_plural = u'Documents'

    def __unicode__(self):
        return u'%s' % (self.id_doc)

And in admin.py

class DocumentsInline(admin.StackedInline):
    model = Documents
    inline_classes = ('grp-collapse grp-open')
    extra = 1
    fk_name = 'name'

I don't know why, but when i try to execute makemigrations, I have this issue :

<class 'newPrpvApp.admin.DocumentsInline'>: (admin.E202) unsupported format character ''' (0x27) at index 41

Can you help me to fix this error please ? ty

0

There are 0 best solutions below