Last change
on this file since 3358 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
File size:
1.1 KB
|
Line | |
---|
1 | def addTrackback(self, url, title, excerpt, blog_name): |
---|
2 | """Add a trackback line to this entry. |
---|
3 | |
---|
4 | The passed variable can be the request containing the trackback |
---|
5 | information or a dict with the appropriate trackback keys. |
---|
6 | """ |
---|
7 | |
---|
8 | added = DateTime.DateTime() |
---|
9 | s = '|'.join((url, title, excerpt, blog_name, str(added))) |
---|
10 | |
---|
11 | current_trackback = self.getTrackbackPings() |
---|
12 | |
---|
13 | updated_trackback = [] |
---|
14 | for line in current_trackback: |
---|
15 | updated_trackback.append(line) |
---|
16 | |
---|
17 | updated_trackback.append(s) |
---|
18 | |
---|
19 | self.setTrackbackPings(updated_trackback) |
---|
20 | |
---|
21 | return True |
---|
22 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
23 | def getWeblogCategories(self): |
---|
24 | """Return a list of the Categories this Entry is assigned""" |
---|
25 | |
---|
26 | result = DisplayList() |
---|
27 | |
---|
28 | weblog = self.quills_tool.getParentWeblog(self) |
---|
29 | |
---|
30 | #topics = self.quills_tool.getWeblogTopics(weblog) |
---|
31 | topics = weblog.getTopics() |
---|
32 | |
---|
33 | for topic in topics: |
---|
34 | result.add(topic.getId(), topic.Title()) |
---|
35 | |
---|
36 | return result |
---|
Note: See
TracBrowser
for help on using the repository browser.