bodhi.spec
by Luke Macken
bodhi.spec | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 623206670dd89df431f54228e604da360d8c4340
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Mar 29 23:50:07 2010 -0400
BuildRequires python-turboflot and python-tgcaptcha for the unit tests
diff --git a/bodhi.spec b/bodhi.spec
index 56c036d..a9eb7c0 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -19,6 +19,7 @@ BuildRequires: python-devel
BuildRequires: TurboGears python-bugzilla
BuildRequires: python-fedora python-TurboMail TurboGears yum koji
+BuildRequires: python-turboflot python-tgcaptcha
%description
Bodhi is a web application that facilitates the process of publishing
14 years, 1 month
bodhi-server setup
by Doug Reiland
What is the BKM for installing and running bohdi-server?
/usr/bin/bodhi-init and /usr/bin/bohdi.devinit don't seem to be the trick.
This is the latest error when I visted http://localhostL8084/updates
File "/usr/lib/python2.6/site-packages/sqlobject/main.py", line 931, in _init
raise SQLObjectNotFound, "The object %s by the ID %s does not
exist" % (self.__class__.__name__, self.id)
SQLObjectNotFound: The object Release by the ID 4 does not exist
Error location in template file
'/usr/lib/python2.6/site-packages/bodhi/templates/welcome.kid'
thanks,
Doug
14 years, 1 month
bodhi.cfg
by Luke Macken
bodhi.cfg | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 9a527747fc051430f3f3f977d770f5cd93f8fc9b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Mar 26 12:49:41 2010 -0400
Right now bodhi requires that you disable transactions
diff --git a/bodhi.cfg b/bodhi.cfg
index 049b422..bc0dcd5 100644
--- a/bodhi.cfg
+++ b/bodhi.cfg
@@ -6,7 +6,9 @@
# DATABASE
sqlobject.dburi="sqlite:///var/tmp/bodhi.sqlite"
-#sqlobject.dburi="postgres://bodhi:B0dh1@localhost/bodhi"
+
+# Right now bodhi requires that you disable transactions.
+#sqlobject.dburi="notrans_postgres://bodhi:B0dh1@localhost/bodhi"
# If you have sqlite, here's a simple default to get you started
# in development
14 years, 1 month
bodhi/model.py
by Luke Macken
bodhi/model.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 1d852c7e1ffc3494b1e97c06535bf1352202c446
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Mar 23 00:55:07 2010 -0400
Reverse the release list in our sidebar
diff --git a/bodhi/model.py b/bodhi/model.py
index 55bb9fe..1363489 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -1115,5 +1115,5 @@ class Releases(Singleton):
rel.update(release.metrics['UpdateTypeMetric'])
releases.append(rel)
releases.sort(lambda x, y: cmp(int(x['long_name'].split()[-1]),
- int(y['long_name'].split()[-1])))
+ int(y['long_name'].split()[-1])), reverse=True)
self.data = releases
14 years, 1 month
2 commits - bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 2 --
1 file changed, 2 deletions(-)
New commits:
commit 857978ae8f8f7f644cca578afed29c8b1d5a0fd8
Merge: 111b7ac... 5ae630f...
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Mar 23 00:48:14 2010 -0400
Merge branch 'master' of git+ssh://git.fedoraproject.org/git/bodhi
commit 111b7ac0f8f534a0eaf7683b1b58a9dd7fbe03ab
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Mar 23 00:45:56 2010 -0400
Don't set the package.suggest_requires permanently when the developer enables it.
By doing this, we have accumulated a large list unnecessary of packages that
now suggest that the user reboot their machine. If a package has ever been a
part of a large multi-build update where the developer has enabled the 'Suggest
Reboot' option, this package would always have this option. This is not ideal.
By disabling this, the 'suggest reboot' metadata option will only be enabled if
the update has a package on bodhi's hardcoded list, or if the developer enables
that option manually.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index c7deb1e..8b3902e 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -747,8 +747,6 @@ class Root(controllers.RootController):
package = Package.byName(nvr[0])
except SQLObjectNotFound:
package = Package(name=nvr[0])
- if suggest_reboot:
- package.suggest_reboot = True
# Update our ACL cache for this pkg
package.committers = buildinfo[build]['people']
14 years, 1 month
Build failed in Hudson: bodhi-py2.4 #26
by Luke Macken
See <http://ci.csh.rit.edu/job/bodhi-py2.4/26/>
------------------------------------------
[...truncated 30 lines...]
Env: PWD=/home/hudson
Env: SHELL=/bin/bash
Env: SHLVL=1
Env: TERM=screen
Env: USER=hudson
Env: WORKSPACE=<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/>
Env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
Fetching changes from the remote Git repository
Fetching upstream changes from git://git.fedorahosted.org/git/bodhi
[workspace] $ git fetch -t git://git.fedorahosted.org/git/bodhi +refs/heads/*:refs/remotes/origin/*
[workspace] $ git ls-tree HEAD
[workspace] $ git tag -l master
[workspace] $ git rev-parse origin/master
Commencing build of Revision 5ae630fd7295de99932b071ccfea391b3e1c8f1a (origin/master)
GitAPI created
Env: _=/usr/bin/java
Env: BUILD_ID=2010-03-22_15-43-51
Env: BUILD_NUMBER=26
Env: BUILD_TAG=hudson-bodhi-py2.4-26
Env: BUILD_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/26/
Env: CLASSPATH=
Env: EXECUTOR_NUMBER=1
Env: G_BROKEN_FILENAMES=1
Env: HISTSIZE=1000
Env: HOME=/home/hudson
Env: HOSTNAME=ci
Env: HUDSON_HOME=/home/hudson/.hudson
Env: HUDSON_URL=http://ci.csh.rit.edu/
Env: INPUTRC=/etc/inputrc
Env: JOB_NAME=bodhi-py2.4
Env: JOB_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/
Env: LANG=en_US.UTF-8
Env: LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386
Env: LESSOPEN=|/usr/bin/lesspipe.sh %s
Env: LOGNAME=hudson
Env: LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
Env: MAIL=/var/spool/mail/hudson
Env: NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
Env: NODE_NAME=
Env: PATH=/usr/local/bin:/bin:/usr/bin:/home/hudson/bin
Env: PWD=/home/hudson
Env: SHELL=/bin/bash
Env: SHLVL=1
Env: TERM=screen
Env: USER=hudson
Env: WORKSPACE=<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/>
Env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
Checking out Revision 5ae630fd7295de99932b071ccfea391b3e1c8f1a (origin/master)
[workspace] $ git checkout -f 5ae630fd7295de99932b071ccfea391b3e1c8f1a
[workspace] $ git tag -a -f -m "Hudson Build #26" hudson-bodhi-py2.4-26
Recording changes in branch origin/master
[workspace] $ git log --pretty=format:%H 5ae630fd7295de99932b071ccfea391b3e1c8f1a..5ae630fd7295de99932b071ccfea391b3e1c8f1a
[workspace] $ /bin/sh -xe /tmp/hudson6262502750967697069.sh
+ python setup.py egg_info
running egg_info
writing requirements to bodhi.egg-info/requires.txt
writing bodhi.egg-info/PKG-INFO
writing top-level names to bodhi.egg-info/top_level.txt
writing dependency_links to bodhi.egg-info/dependency_links.txt
writing entry points to bodhi.egg-info/entry_points.txt
reading manifest file 'bodhi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'start-bodhi'
warning: no files found matching 'ChangeLog'
writing manifest file 'bodhi.egg-info/SOURCES.txt'
+ nosetests
................F.......F...F.F..F..................FF......Exception in thread VisitManager:
Traceback (most recent call last):
File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
self.run()
File "/usr/lib/python2.4/site-packages/turbogears/visit/api.py", line 352, in run
self.update_queued_visits(queue)
File "/usr/lib/python2.4/site-packages/turbogears/visit/sovisit.py", line 86, in update_queued_visits
conn.query(conn.sqlrepr(u))
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py", line 846, in query
return self._dbConnection._query(self._connection, s)
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py", line 349, in _query
self._executeRetry(conn, conn.cursor(), s)
File "/usr/lib/python2.4/site-packages/sqlobject/sqlite/sqliteconnection.py", line 178, in _executeRetry
raise OperationalError(ErrorMessage(e))
OperationalError: no such table: visit
......................................................
======================================================================
FAIL: Make sure our captcha does its job
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 1073, in test_anonymous_captcha
assert 'An email address must contain a single @' in cherrypy.response.body[0]
AssertionError:
-------------------- >> begin captured stdout << ---------------------
/updates/save?stable_karma=5&builds=TurboGears-2.6.23.1-21.fc7¬es=foobar&request=Stable&bugs=&unstable_karma=-5&type_=security&release=Fedora+7
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: test_bullets (bodhi.tests.test_controllers.TestControllers)
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 1917, in test_bullets
assert '\xc2\xb7' in body
AssertionError:
-------------------- >> begin captured stdout << ---------------------
/updates/save?type_=bugfix¬es=%C2%B7&cves=&builds=TurboGears-1.0.2.2-2.fc7&bugs=1
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: test_critpath_actions_in_normal_release (bodhi.tests.test_controllers.TestControllers)
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 1382, in test_critpath_actions_in_normal_release
assert "Push to Stable" in cherrypy.response.body[0]
AssertionError:
-------------------- >> begin captured stdout << ---------------------
/updates/save?stable_karma=1&builds=kernel-2.6.31-1.fc7¬es=foobar&request=None&bugs=&unstable_karma=-1&type_=bugfix&release=Fedora+7
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: Ensure devs can attempt to push critpath updates for pending releases
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 1489, in test_critpath_to_frozen_release_available_actions
assert "Push to Testing" in cherrypy.response.body[0]
AssertionError:
-------------------- >> begin captured stdout << ---------------------
/updates/save?stable_karma=1&builds=kernel-2.6.31-1.fc7¬es=foobar&request=None&bugs=&unstable_karma=-1&type_=bugfix&release=Fedora+7
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: Ensure releng/qa can push critpath updates to stable for pending releases
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 1520, in test_critpath_to_pending_release_num_approved_comments
assert "Push to Testing" in cherrypy.response.body[0]
AssertionError:
-------------------- >> begin captured stdout << ---------------------
/updates/save?stable_karma=1&builds=kernel-2.6.31-1.fc7¬es=foobar&request=None&bugs=&unstable_karma=-1&type_=bugfix&release=Fedora+7
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: test_non_critpath_actions_in_normal_release (bodhi.tests.test_controllers.TestControllers)
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 1412, in test_non_critpath_actions_in_normal_release
assert "Push to Testing" in cherrypy.response.body[0]
AssertionError:
-------------------- >> begin captured stdout << ---------------------
/updates/save?stable_karma=1&builds=nethack-2.6.31-1.fc7¬es=foobar&request=None&bugs=&unstable_karma=-1&type_=bugfix&release=Fedora+7
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: Ensure non-critpath packages can still be pushed to stable as usual
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 1634, in test_non_critpath_to_frozen_release_testing
assert "/updates/request/stable" in cherrypy.response.body[0], cherrypy.response.body[0]
AssertionError: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<title>500 Internal error</title>
<style type="text/css">
#powered_by {
margin-top: 20px;
border-top: 2px solid black;
font-style: italic;
}
#traceback {
color: red;
}
</style>
</head>
<body>
<h2>500 Internal error</h2>
<p>The server encountered an unexpected condition which prevented it from fulfilling the request.</p>
<pre id="traceback">Page handler: <bound method Root.default of <bodhi.controllers.Root object at 0xa2a964c>>
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 121, in _run
self.main()
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 264, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in default
File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 358, in expose
output = database.run_with_transaction(
File "<string>", line 5, in run_with_transaction
File "/usr/lib/python2.4/site-packages/turbogears/database.py", line 363, in so_rwt
retval = func(*args, **kw)
File "<string>", line 5, in _expose
File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 373, in <lambda>
mapping, fragment, args, kw)))
File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 420, in _execute_func
return _process_output(output, template, format, content_type, mapping, fragment)
File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 88, in _process_output
fragment=fragment)
File "/usr/lib/python2.4/site-packages/turbogears/view/base.py", line 159, in render
return engine.render(**kw)
File "/usr/lib/python2.4/site-packages/turbokid/kidsupport.py", line 206, in render
output=output, format=format)
File "/usr/lib/python2.4/site-packages/kid/__init__.py", line 301, in serialize
raise_template_error(module=self.__module__)
File "/usr/lib/python2.4/site-packages/kid/__init__.py", line 299, in serialize
return serializer.serialize(self, encoding, fragment, format)
File "/usr/lib/python2.4/site-packages/kid/serialization.py", line 107, in serialize
text = ''.join(self.generate(stream, encoding, fragment, format))
File "/usr/lib/python2.4/site-packages/kid/serialization.py", line 631, in generate
for ev, item in self.apply_filters(stream, format):
File "/usr/lib/python2.4/site-packages/kid/serialization.py", line 165, in format_stream
for ev, item in stream:
File "/usr/lib/python2.4/site-packages/kid/parser.py", line 221, in _coalesce
for ev, item in stream:
File "/usr/lib/python2.4/site-packages/kid/serialization.py", line 479, in inject_meta_tags
for ev, item in stream:
File "/usr/lib/python2.4/site-packages/kid/parser.py", line 179, in _track
for p in stream:
File "/usr/lib/python2.4/site-packages/kid/filter.py", line 26, in apply_matches
for ev, item in stream:
File "/usr/lib/python2.4/site-packages/kid/parser.py", line 179, in _track
for p in stream:
File "/usr/lib/python2.4/site-packages/kid/parser.py", line 221, in _coalesce
for ev, item in stream:
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/templates/show.py",> line 59, in _pull
ImportError: No module named markdown
Error location in template file '<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/templates/show.kid'>
between line 12 and line 49:
<?python
...
?>
</pre>
<div id="powered_by">
<span>Powered by <a href="http://www.cherrypy.org">CherryPy 2.3.0</a></span>
</div>
</body>
</html>
-------------------- >> begin captured stdout << ---------------------
/updates/save?stable_karma=1&builds=nethack-2.6.31-1.fc7¬es=foobar&request=None&bugs=&unstable_karma=-1&type_=bugfix&release=Fedora+7
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 114 tests in 190.151s
FAILED (failures=7)
14 years, 1 month
bodhi.spec bodhi/templates setup.py
by Mathieu Bridon
bodhi.spec | 2 +-
bodhi/templates/show.kid | 8 ++------
setup.py | 1 +
3 files changed, 4 insertions(+), 7 deletions(-)
New commits:
commit 5ae630fd7295de99932b071ccfea391b3e1c8f1a
Author: Mathieu Bridon <bochecha(a)fedoraproject.org>
Date: Sat Mar 20 16:15:03 2010 +0100
Markdown module dependency.
Revision f405798d726f0102fcc8695ba7b85a9d2cedf73b introduced a dependency on the
python markdown2 module in order to display the update notes in a more
friendly way.
This turned out to not be the best idea ever. There exist 2 Python modules for
parsing Markdown syntax. The markdown2 one has some outstanding issues, and
doesn't seem to be actively developped since December 2009. The other markdown
module however works much better and is being actively developped at Gitorious.
This move fixes two recently reported issues in the process:
* https://fedorahosted.org/bodhi/ticket/395
* https://fedorahosted.org/fedora-infrastructure/ticket/2033
diff --git a/bodhi.spec b/bodhi.spec
index 52ab6a6..56c036d 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -58,7 +58,7 @@ Requires: python-tgcaptcha
Requires: python-decorator
Requires: mod_wsgi
Requires: httpd
-Requires: python-markdown2
+Requires: python-markdown
%description server
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 82d1868..19c0c3d 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -13,7 +13,7 @@
from cgi import escape
from bodhi import util
from turbogears import identity
-from markdown2 import markdown
+from markdown import markdown
import re
## Link to build info and logs
@@ -39,11 +39,7 @@ release = util.link(update.release.long_name, '/' + update.release.name)
submitter = util.link(update.submitter, '/user/' + update.submitter)
reg = re.compile(r'(^[-*] .*(?:\n[-*] .*)*)', re.MULTILINE)
-
-markdown_extras = [
- "code-friendly" # Disable _ and __ for em and strong. Underscores is a frequent character in URLs, let's not break them.
- ]
-notes = markdown(reg.sub(r'\n\1\n', escape(update.notes)), extras=markdown_extras)
+notes = markdown(reg.sub(r'\n\1\n', escape(update.notes)))
if update.karma < 0: karma = -1
elif update.karma > 0: karma = 1
diff --git a/setup.py b/setup.py
index d0f5972..170d17a 100755
--- a/setup.py
+++ b/setup.py
@@ -165,6 +165,7 @@ setup(
"TurboGears >= 1.0",
"TurboMail",
"python_fedora",
+ "markdown",
],
scripts = [],
data_files = data_files,
14 years, 1 month
Markdown issues
by Mathieu Bridon
Hi,
Some time ago, I introduced a dependency against the python-markdown2
module in Bodhi. [1][2]
Today, two bugs were opened against Bodhi, both related to the way the
Markdown module parses the text we feed it:
- https://fedorahosted.org/bodhi/ticket/395
- https://fedorahosted.org/fedora-infrastructure/ticket/2033
The first one is caused by the fact that « _ » is interpreted by
Markdown: _foo_ is translated to <em>foo</em> and __foo__ to
<strong>foo</strong>.
This doesn't seem like a problem, except in cases like $SOME_LONG_VAR
or http://foo-bar.com/foo_3_2.tar.gz, which are rather likely to
appear in updates description.
I fixed it by disabling the interpretation of « _ » and « __ ». Not a
great solution though, as this makes us not follow completely the
Markdown syntax.
The second one however is way more tricky, as it comes from the regexp
used to parse the string to translate. Basically, a string like «
***** Important ***** » can be translated in several ways, depending
on the regexp/machine state used:
1. <strong><em>* Important *</em></strong>
2. <strong><em></strong> Important <strong><em></strong>
3. <em></em><strong><em> Important **</em></strong>
The parser could even try to be smart and close open tags properly
(Trac does something like that, in its own syntax which is close to
Markdown):
4. <strong><em></em></strong> Important <strong><em></em></strong>
(</em> were added to close the tags)
The possibilities are basically endless.
Unfortunately, the python-markdown2 module does the second. The
resulting HTML is thus not valid, so Kid gives an error 500.
I tried looking at the python-markdown2 module, but the fix won't be
easy (at least not for me :). Also, I doubt it will be useful to
report the bug and eventually submit a patch, as the project seems
dead upstream since december (last commits/mail discussions, bugs are
not answered even with patches attached,...).
One thing I'm really sad of, is that I had seen there was another
Markdown python module: python-markdown [3], but I chose the other
one.
It seems anterior to python-markdown2, however, it is still actively
maintained (last release was in April 2009, but mails and bugs are
still answered by the dev, development is active in Gitorious [4]).
Also, it has two nice side-effects:
1. it fixes our first issue in a much more elegant way, as it is able
to translate _foo_ to <em>foo</em>, while recognizing that it
shouldn't translate $SOME_LONG_VAR to $SOME<em>LONG</em>VAR (ignore
underscores inside a word)
2. it interprets the string « ***** Important ***** » as «
<strong><em>** test </em></strong>** », which (even if not really the
best translation prettyness-wise), is valid HTML.
All in all, I would be more confident with this module than with the
current one (and I'm not even counting the fact that it has an
extensive test suite).
Should we rebase Bodhi on this module? The port is trivial,
python-markdown is available both in Fedora and EPEL, but I don't
really like moving to another dependency just because we encounter
bugs, especially since I should have more carefully chosen the module
to use in the first place. :(
What do you think?
[1] https://fedorahosted.org/bodhi/ticket/286
[2] http://code.google.com/p/python-markdown2/
[3] http://www.freewisdom.org/projects/python-markdown/
[4] http://gitorious.org/python-markdown
----------
Mathieu Bridon
14 years, 1 month
bodhi/templates
by Luke Macken
bodhi/templates/search.kid | 41 ++++++++++++++++++++++++++++++++++++-----
1 file changed, 36 insertions(+), 5 deletions(-)
New commits:
commit fba2df1bbe7fbd7980e8a61e44c653901141e2de
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Mar 18 14:15:38 2010 -0400
Improve our search results (ticket #389)
diff --git a/bodhi/templates/search.kid b/bodhi/templates/search.kid
index ed5f0cc..6939aa8 100644
--- a/bodhi/templates/search.kid
+++ b/bodhi/templates/search.kid
@@ -20,15 +20,24 @@
<table class="list">
<tr class="list">
<th class="list">
- <b>ID</b>
+ <b>Update</b>
</th>
<th class="list">
- <b>Update</b>
+ <b>Release</b>
</th>
<th class="list">
<center><b>Type</b></center>
</th>
<th class="list">
+ <center><b>Status</b></center>
+ </th>
+ <th class="list">
+ <center><b>Request</b></center>
+ </th>
+ <th class="list">
+ <center><b>Karma</b></center>
+ </th>
+ <th class="list">
<b>Submitter</b>
</th>
<th class="list">
@@ -37,16 +46,30 @@
</tr>
<?python row_color = "#FFFFFF" ?>
<tr class="list" bgcolor="${row_color}" py:for="update in updates">
- <td class="list">
- ${update.updateid}
- </td>
<td class="list" width="35%">
<a class="list" href="${tg.url(update.get_url())}">${update.title.replace(',', ', ')}</a>
</td>
+ <td class="list">
+ <a class="list" href="${tg.url('/%s' % update.release.name)}">${update.release.name}</a>
+ </td>
<td class="list" align="center">
<img src="${tg.url('/static/images/%s.png' % update.type)}" title="${update.type}" />
</td>
<td class="list">
+ ${update.status}
+ </td>
+ <td class="list">
+ <img src="${tg.url('/static/images/%s-large.png' % update.request)}" title="${update.request}"/> ${update.request}
+ </td>
+ <?python
+ if update.karma < 0: karma = -1
+ elif update.karma > 0: karma = 1
+ else: karma = 0
+ ?>
+ <td class="list" align="center">
+ <img src="${tg.url('/static/images/karma%d.png' % karma)}" align="top"/> <b>${update.karma}</b>
+ </td>
+ <td class="list">
<a href="${tg.url('/user/' + update.submitter)}">${update.submitter}</a>
</td>
<td class="list">
@@ -56,5 +79,13 @@
</tr>
</table>
+ <div py:if="num_items" class="list">
+ <span py:for="page in tg.paginate.pages">
+ <a py:if="page != tg.paginate.current_page"
+ href="${tg.paginate.get_href(page)}">${page}</a>
+ <b py:if="page == tg.paginate.current_page">${page}</b>
+ </span>
+ </div>
+
</body>
</html>
14 years, 1 month