#25016: The related_name of ForeignKey cannot be Unicode name after Django 1.8
----------------------------------------------+--------------------
     Reporter:  sih4sing5hong5                |      Owner:  nobody
         Type:  Uncategorized                 |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.8
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 I asked in [https://groups.google.com/forum/#!topic/django-
 users/9KV_uzEQloA django-user]


 This code can run before django 1.7
 But "related_name" got an error after django 1.8

 {{{
 使用者表.來源: (fields.E306) The name '使用者' is invalid related_name for
 field 使用者表.來源
 }}}

 {{{
 class 來源表(models.Model):
     名 = models.CharField(max_length=100)

 class 使用者表(models.Model):
     來源 = models.OneToOneField(來源表, related_name='使用者',
 primary_key=True, null=False)
 }}}

 Tim Graham said "It looks like the check added in ticket #22064 may be too
 strict (only allowing alphanumeric characters in related_name)."

--
Ticket URL: <https://code.djangoproject.com/ticket/25016>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/057.6079987f183ad4b0fc0bfec94b581f9e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to