title: unicode error when saving an object in django admin
body: <p>In my django app, I have some objects that cause the corresponding URL in the django admin to be non ascii. (for example: <code>http://mysite/admin/myapp/myclass/Présentation/</code>)</p>
  
  <p>I can edit the object without any problem but when I save it I have the following error:</p>
  
  <p><code>UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 24: ordinal not in range(128), HTTP response headers must be in US-ASCII format</code></p>
  
  <p>The strange thing is that the object is correctly saved into the database.</p>
  
  <p>Does anybody know how the Django admin manages unicode? Any info, pointer or idea that can help to fix this problem would be appreciated.</p>
  
  <p>Thanks in advance</p>
  
  <p>Update: Here is the code of the Model</p>
  
  <pre><code>class Plugin(models.Model):
      """Some subcontent that can be added to a given page"""
      class Meta:
          ordering = ['ordering']
  
      name = models.CharField(max_length=32, primary_key=True)
      div_id = models.CharField(default='rightcol', max_length=32)
      published = models.BooleanField(default=True,
          help_text=_("If this is not checked, it is not displayed on the page."))
      ordering = models.IntegerField(default=1,
          help_text=_("plugins are sorted with this number in ascending order"))
      content = models.TextField(blank=True)
      registration_required = models.BooleanField(_('registration required'),
          help_text=_("If this is checked, only logged-in users will be able to view the page."))
  
      def __unicode__(self):
          return u"%s -- %s" % (self.name, self.div_id)
  </code></pre>
  
  <p>Update:
  That's clear that non-ascii character are not recommended in an URL. That's the cause of my problem and I have changed that.</p>
  
  <p>Does anybody know what is used by the Django admin to build the URL of an object. I guess that it is the primary key. Is it right? is there a way to force Django to use something else and to retrieve the object safely?</p>