diff options
Diffstat (limited to 'app/pages/models.py')
-rw-r--r-- | app/pages/models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/pages/models.py b/app/pages/models.py index 9b7be7f..0bbd069 100644 --- a/app/pages/models.py +++ b/app/pages/models.py @@ -11,12 +11,16 @@ class Page(models.Model): body_markdown = models.TextField() meta_description = models.CharField(max_length=256, null=True, blank=True) path = models.CharField(max_length=200, null=True, blank=True) + app = models.CharField(max_length=50, null=True, blank=True) def __unicode__(self): return self.title def get_absolute_url(self): - return "/%s/" % (self.slug) + if self.path: + return "/%s/%s" % (self.path, self.slug) + else: + return "/%s" % (self.slug) def save(self): # run markdown |