PageRenderTime 132ms CodeModel.GetById 50ms app.highlight 1ms RepoModel.GetById 59ms app.codeStats 0ms

/tests/regressiontests/model_permalink/models.py

https://code.google.com/p/mango-py/
Python | 10 lines | 8 code | 2 blank | 0 comment | 0 complexity | 228902f9ba71e0248e5ae477e26ee4e5 MD5 | raw file
 1from django.db import models
 2
 3class Guitarist(models.Model):
 4    name = models.CharField(max_length=50)
 5    slug = models.CharField(max_length=50)
 6
 7    @models.permalink
 8    def url(self):
 9        "Returns the URL for this guitarist."
10        return ('guitarist_detail', [self.slug])