mirror of
https://github.com/django/django.git
synced 2024-11-28 02:27:42 +01:00
16411b8400
Thanks to Tim Graham for the review.
17 lines
384 B
Python
17 lines
384 B
Python
from django.db import models
|
|
from django.urls import reverse
|
|
|
|
|
|
class TestModel(models.Model):
|
|
name = models.CharField(max_length=100)
|
|
|
|
def get_absolute_url(self):
|
|
return '/testmodel/%s/' % self.id
|
|
|
|
|
|
class I18nTestModel(models.Model):
|
|
name = models.CharField(max_length=100)
|
|
|
|
def get_absolute_url(self):
|
|
return reverse('i18n_testmodel', args=[self.id])
|