changeset 12518 | 12e8b65146d9 |
12517:34c4157b1071 | 12518:12e8b65146d9 |
---|---|
1 from cubicweb.entities import AnyEntity, fetch_config |
|
2 |
|
3 |
|
4 class Card(AnyEntity): |
|
5 __regid__ = 'Card' |
|
6 rest_attr = 'wikiid' |
|
7 |
|
8 fetch_attrs, cw_fetch_order = fetch_config(['title']) |
|
9 |
|
10 def rest_path(self): |
|
11 if self.wikiid: |
|
12 return '%s/%s' % (str(self.e_schema).lower(), |
|
13 self._cw.url_quote(self.wikiid, safe='/')) |
|
14 else: |
|
15 return super(Card, self).rest_path() |