Skip to content

Commit

Permalink
SystemField changed to use method "_text" instead of "text" to allow …
Browse files Browse the repository at this point in the history
…override
  • Loading branch information
marinho committed Mar 29, 2011
1 parent 66f7918 commit f5826db
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2011-03-29: Version 0.4.12-stable
--------------------------------

* SystemField changed to use method "_text" instead of "text" to allow override

2011-02-16: Version 0.4.11-alpha
--------------------------------

Expand Down
Binary file added docs/marketing/Geraldo Reports projects.key
Binary file not shown.
Binary file added docs/marketing/Geraldo Reports projects.pdf
Binary file not shown.
Binary file added docs/marketing/page1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/marketing/page2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion geraldo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
- tests - a package with automated doc tests.
"""

VERSION = (0, 4, 11, 'alpha')
VERSION = (0, 4, 12, 'stable')

def get_version():
return '%d.%d.%d-%s'%VERSION
Expand Down
4 changes: 3 additions & 1 deletion geraldo/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def __init__(self, **kwargs):

self.fields['current_datetime'] = datetime.datetime.now()

def text(self):
def _text(self):
page_number = (self.fields.get('page_number') or self.generator._current_page_number) + self.generator.first_page_number - 1
page_count = self.fields.get('page_count') or self.generator.get_page_count()

Expand All @@ -347,6 +347,8 @@ def text(self):
return self.get_value(self.expression, fields)

return self.expression%SystemFieldDict(self, fields)

def text(self): return self._text()
text = property(text)

def clone(self):
Expand Down

0 comments on commit f5826db

Please sign in to comment.