2015-02-10 13:11:25 +00:00
|
|
|
from django.db import models
|
2015-12-30 15:51:16 +00:00
|
|
|
from django.urls import reverse
|
2015-02-10 13:11:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestModel(models.Model):
|
|
|
|
name = models.CharField(max_length=100)
|
2017-03-17 19:25:50 +00:00
|
|
|
lastmod = models.DateTimeField(null=True)
|
2015-02-10 13:11:25 +00:00
|
|
|
|
|
|
|
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])
|