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):
|
2022-02-03 19:24:19 +00:00
|
|
|
return "/testmodel/%s/" % self.id
|
2015-02-10 13:11:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
class I18nTestModel(models.Model):
|
|
|
|
name = models.CharField(max_length=100)
|
|
|
|
|
|
|
|
def get_absolute_url(self):
|
2022-02-03 19:24:19 +00:00
|
|
|
return reverse("i18n_testmodel", args=[self.id])
|