Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/okfn/ckan
Browse files Browse the repository at this point in the history
rossjones committed Mar 28, 2012
2 parents 3933e33 + 3119a58 commit 4381150
Showing 84 changed files with 29,940 additions and 13,876 deletions.
34 changes: 34 additions & 0 deletions bin/running_stats.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
'''Tool for a script to keep track changes performed on a large number
of objects.
StatsCount - when you are counting incidences of a small set of outcomes
StatsList - when you also want to remember an ID associated with each incidence
Examples:
from running_stats import StatsCount
package_stats = StatsCount()
for package in packages:
if package.enabled:
package.delete()
package_stats.increment('deleted')
else:
package_stats.increment('not deleted')
print package_stats.report()
> deleted: 30
> not deleted: 70
from running_stats import StatsList
package_stats = StatsList()
for package in packages:
if package.enabled:
package.delete()
package_stats.add('deleted', package.name)
else:
package_stats.add('not deleted' package.name)
print package_stats.report()
> deleted: 30 pollution-uk, flood-regions, river-quality, ...
> not deleted: 70 spending-bristol, ...
'''

import copy

class StatsCount(dict):
2 changes: 1 addition & 1 deletion ckan/config/deployment.ini_tmpl
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ ckan.build_search_index_synchronously = true
ckan.site_title = CKAN

## Logo image to use on the home page
ckan.site_logo = /img/logo.png
ckan.site_logo = /img/logo_64px_wide.png

## Site tagline / description (used on front page)
ckan.site_description =
1 change: 1 addition & 0 deletions ckan/controllers/authorization_group.py
Original file line number Diff line number Diff line change
@@ -151,6 +151,7 @@ def authz(self, id):
abort(404, _('Group not found'))

c.authorization_group_name = authorization_group.name
c.authorization_group = authorization_group

c.authz_editable = self.authorizer.am_authorized(c, model.Action.EDIT_PERMISSIONS,
authorization_group)
Binary file modified ckan/i18n/bg/LC_MESSAGES/ckan.mo
Binary file not shown.
Loading

0 comments on commit 4381150

Please sign in to comment.