[ckan-changes] commit/ckan: 3 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Jun 13 08:54:26 UTC 2011
3 new changesets in ckan:
http://bitbucket.org/okfn/ckan/changeset/2444024441ae/
changeset: 2444024441ae
user: pudo
date: 2011-06-09 16:18:32
summary: [lib] add some rdfaishness to links in package read
affected #: 2 files (77 bytes)
--- a/ckan/controllers/api.py Sun Jun 12 16:08:58 2011 +0100
+++ b/ckan/controllers/api.py Thu Jun 09 16:18:32 2011 +0200
@@ -258,7 +258,8 @@
action = action_map.get(register)
if not action:
response.status_int = 400
- return gettext('Cannot update entity of this type: %s') % register
+ return gettext('Cannot update entity of this type: %s') % \
+ register.encode('utf-8')
try:
response_data = action(request_data, context)
return self._finish_ok(response_data)
--- a/ckan/lib/package_saver.py Sun Jun 12 16:08:58 2011 +0100
+++ b/ckan/lib/package_saver.py Thu Jun 09 16:18:32 2011 +0200
@@ -40,7 +40,8 @@
error_msg = "<span class='inline-warning'>%s</span>" % _("Cannot render package description")
c.pkg_notes_formatted = genshi.HTML(error_msg)
c.current_rating, c.num_ratings = ckan.rating.get_rating(pkg)
- c.pkg_url_link = h.link_to(c.pkg.url, c.pkg.url, target='_blank') if c.pkg.url else _("No web page given")
+ c.pkg_url_link = h.link_to(c.pkg.url, c.pkg.url, rel='foaf:homepage', target='_blank') \
+ if c.pkg.url else _("No web page given")
c.pkg_author_link = cls._person_email_link(c.pkg.author, c.pkg.author_email, "Author")
c.pkg_maintainer_link = cls._person_email_link(c.pkg.maintainer, c.pkg.maintainer_email, "Maintainer")
c.package_relationships = pkg.get_relationships_printable()
http://bitbucket.org/okfn/ckan/changeset/aa0749912768/
changeset: aa0749912768
user: pudo
date: 2011-06-12 21:48:55
summary: [controllers] move plugins behind package rendering to be able to influence its output
affected #: 1 file (1 byte)
--- a/ckan/controllers/package.py Thu Jun 09 16:18:32 2011 +0200
+++ b/ckan/controllers/package.py Sun Jun 12 21:48:55 2011 +0200
@@ -200,11 +200,10 @@
if not auth_for_read:
abort(401, _('Unauthorized to read package %s') % id)
+ #render the package
+ PackageSaver().render_package(c.pkg)
for item in self.extensions:
item.read(c.pkg)
-
- #render the package
- PackageSaver().render_package(c.pkg)
return render('package/read.html')
def comments(self, id):
http://bitbucket.org/okfn/ckan/changeset/1ab655b7b76a/
changeset: 1ab655b7b76a
user: pudo
date: 2011-06-13 10:54:06
summary: [config] enable caching of static resources
affected #: 2 files (97 bytes)
--- a/ckan/config/middleware.py Sun Jun 12 21:48:55 2011 +0200
+++ b/ckan/config/middleware.py Mon Jun 13 10:54:06 2011 +0200
@@ -97,7 +97,8 @@
if asbool(static_files):
# Serve static files
- static_app = StaticURLParser(config['pylons.paths']['static_files'])
+ static_app = StaticURLParser(config['pylons.paths']['static_files'],
+ cache_max_age=3600)
static_parsers = [static_app, app]
# Configurable extra static file paths
@@ -105,7 +106,8 @@
for public_path in config.get('extra_public_paths', '').split(','):
if public_path.strip():
extra_static_parsers.append(
- StaticURLParser(public_path.strip())
+ StaticURLParser(public_path.strip(),
+ cache_max_age=3600)
)
app = Cascade(extra_static_parsers+static_parsers)
--- a/ckan/templates/layout_base.html Sun Jun 12 21:48:55 2011 +0200
+++ b/ckan/templates/layout_base.html Mon Jun 13 10:54:06 2011 +0200
@@ -34,7 +34,7 @@
<script type="text/javascript" src="http://assets.okfn.org/ext/jquery.cookie/jquery.cookie.min.js"></script><script type="text/javascript" src="http://assets.okfn.org/ext/jquery.placeholder/jquery.placeholder.js"></script><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
- <script type="text/javascript" src="${g.site_url}/scripts/application.js"></script>
+ <script type="text/javascript" src="${g.site_url}/scripts/application.js?lang=${c.locale}"></script><script type="text/javascript">
$(document).ready(function() {
Repository URL: https://bitbucket.org/okfn/ckan/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list