repo.or.cz
/
gae.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
App Engine Python SDK version 1.7.4 (2)
[gae.git]
/
python
/
lib
/
django_1_4
/
tests
/
regressiontests
/
model_permalink
/
models.py
blob
4823fd46c7ac1f872f4d5163ec79d2725806d91b
1
from
django
.
db
import
models
2
3
4
class
Guitarist
(
models
.
Model
):
5
name
=
models
.
CharField
(
max_length
=
50
)
6
slug
=
models
.
CharField
(
max_length
=
50
)
7
8
@models
.
permalink
9
def
url
(
self
):
10
"Returns the URL for this guitarist."
11
return
(
'guitarist_detail'
, [
self
.
slug
])