mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Merge pull request #123 from apollo13/ticket18381
Fixed #18381 -- Stopped escaping object ids when passing them to the contenttypes.shortcut view. Thanks apollo13 for the patch and dhepper for the review.
This commit is contained in:
@@ -95,10 +95,13 @@ class CustomArticle(models.Model):
|
||||
|
||||
|
||||
class ModelWithStringPrimaryKey(models.Model):
|
||||
id = models.CharField(max_length=255, primary_key=True)
|
||||
string_pk = models.CharField(max_length=255, primary_key=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.id
|
||||
return self.string_pk
|
||||
|
||||
def get_absolute_url(self):
|
||||
return u'/dummy/%s/' % self.string_pk
|
||||
|
||||
|
||||
class Color(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user