~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wiki/feeds.py

  • Committer: franku
  • Date: 2018-05-06 08:20:39 UTC
  • mto: This revision was merged to the branch mainline in revision 494.
  • Revision ID: somal@arcor.de-20180506082039-v8n40alffhi2ulct
This is an Attribute error

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
    def item_pubdate(self, item):
21
21
        """Return the item's pubdate.
22
 
    
 
22
 
23
23
        It's this modified date
24
 
    
 
24
 
25
25
        """
26
26
        return item.modified
27
27
 
 
28
    def item_author_name(self, item):
 
29
        """Takes the object returned by items(), and returns the feeds's
 
30
        auhor's name as a Python string."""
 
31
        if item.is_anonymous_change():
 
32
            return 'Anonymous'
 
33
        return item.editor.username
 
34
 
28
35
# Validated through http://validator.w3.org/feed/
29
36
 
30
37
 
77
84
 
78
85
    def item_updateddate(self, item):
79
86
        return item.modified
 
87
 
 
88
    def item_author_name(self, item):
 
89
        """Takes the object returned by items(), and returns the feeds's
 
90
        auhor's name as a Python string."""
 
91
        if item.is_anonymous_change():
 
92
            return 'Anonymous'
 
93
        return item.editor.username