[ckan-changes] commit/ckan: 3 new changesets
Bitbucket
commits-noreply at bitbucket.org
Wed Nov 2 11:46:17 UTC 2011
3 new commits in ckan:
https://bitbucket.org/okfn/ckan/changeset/99df3e504477/
changeset: 99df3e504477
branch: release-v1.5
user: dread
date: 2011-11-02 11:50:59
summary: [i18n]: Compiled translations.
affected #: 4 files
diff -r 6c811062bc10b43ce7cdceac7ee7a22e4191274b -r 99df3e5044776a8457795fe2b9810515a54fe13a ckan/i18n/hu/LC_MESSAGES/ckan.mo
Binary file ckan/i18n/hu/LC_MESSAGES/ckan.mo has changed
diff -r 6c811062bc10b43ce7cdceac7ee7a22e4191274b -r 99df3e5044776a8457795fe2b9810515a54fe13a ckan/i18n/pl/LC_MESSAGES/ckan.mo
Binary file ckan/i18n/pl/LC_MESSAGES/ckan.mo has changed
diff -r 6c811062bc10b43ce7cdceac7ee7a22e4191274b -r 99df3e5044776a8457795fe2b9810515a54fe13a ckan/i18n/sv/LC_MESSAGES/ckan.mo
Binary file ckan/i18n/sv/LC_MESSAGES/ckan.mo has changed
diff -r 6c811062bc10b43ce7cdceac7ee7a22e4191274b -r 99df3e5044776a8457795fe2b9810515a54fe13a ckan/i18n/sv/LC_MESSAGES/ckan.po
--- a/ckan/i18n/sv/LC_MESSAGES/ckan.po
+++ b/ckan/i18n/sv/LC_MESSAGES/ckan.po
@@ -10,7 +10,7 @@
"Project-Id-Version: CKAN (Comprehensive Knowledge Archive Network)\n"
"Report-Msgid-Bugs-To: http://www.ckan.org/\n"
"POT-Creation-Date: 2011-10-26 17:10+0100\n"
-"PO-Revision-Date: 2011-10-26 16:11+0000\n"
+"PO-Revision-Date: 2011-11-02 10:31+0000\n"
"Last-Translator: dread <internet at davidread.org>\n"
"Language-Team: Swedish (http://www.transifex.net/projects/p/ckan/team/sv/)\n"
"MIME-Version: 1.0\n"
@@ -289,7 +289,7 @@
#: ckan/controllers/revision.py:103
#, python-format
msgid "Packages affected: %s.\n"
-msgstr "Paket som påverkas: %s\\n"
+msgstr "Paket som påverkas: %s\n"
#: ckan/controllers/revision.py:178
msgid "Revision updated"
https://bitbucket.org/okfn/ckan/changeset/9e51df5c496b/
changeset: 9e51df5c496b
branch: release-v1.5
user: dread
date: 2011-11-02 12:33:20
summary: [cli]: #1440 "db load" now does upgrade and search index rebuild. Added "db load-only" for old behaviour - useful to debug.
affected #: 1 file
diff -r 99df3e5044776a8457795fe2b9810515a54fe13a -r 9e51df5c496b9c08cfb108b79e9e65a591e2daae ckan/lib/cli.py
--- a/ckan/lib/cli.py
+++ b/ckan/lib/cli.py
@@ -66,6 +66,8 @@
db simple-dump-json {file-path}
db send-rdf {talis-store} {username} {password}
db load {file-path} # load a pg_dump from a file
+ db load-only {file-path} # load a pg_dump from a file but don\'t do
+ # the schema upgrade or search indexing
db create-from-model # create database from the model (indexes not made)
'''
summary = __doc__.split('\n')[0]
@@ -96,8 +98,12 @@
model.repo.upgrade_db(self.args[1])
else:
model.repo.upgrade_db()
- elif cmd == 'dump' or cmd == 'load':
- self.dump_or_load(cmd)
+ elif cmd == 'dump':
+ self.dump(cmd)
+ elif cmd == 'load':
+ self.load(cmd)
+ elif cmd == 'load-only':
+ self.load(cmd, only_load=True)
elif cmd == 'simple-dump-csv':
self.simple_dump_csv(cmd)
elif cmd == 'simple-dump-json':
@@ -161,21 +167,34 @@
if retcode != 0:
raise SystemError('Command exited with errorcode: %i' % retcode)
- def dump_or_load(self, cmd):
+ def dump(self, cmd):
if len(self.args) < 2:
print 'Need pg_dump filepath'
return
dump_path = self.args[1]
psql_cmd = self._get_psql_cmd() + ' -f %s'
- if cmd == 'load':
- pg_cmd = self._postgres_load(dump_path)
- elif cmd == 'dump':
- pg_cmd = self._postgres_dump(dump_path)
+ pg_cmd = self._postgres_dump(dump_path)
+
+ def load(self, cmd, only_load=False):
+ if len(self.args) < 2:
+ print 'Need pg_dump filepath'
+ return
+ dump_path = self.args[1]
+
+ psql_cmd = self._get_psql_cmd() + ' -f %s'
+ pg_cmd = self._postgres_load(dump_path)
+ if not only_load:
+ print 'Upgrading DB'
+ from ckan import model
+ model.repo.upgrade_db()
+
+ print 'Rebuilding search index'
+ import ckan.lib.search
+ ckan.lib.search.rebuild()
else:
- print 'Unknown command', cmd
- if cmd == 'load':
- print 'Now remember you have to call \'db upgrade\'.'
+ print 'Now remember you have to call \'db upgrade\' and then \'search-index rebuild\'.'
+ print 'Done'
def simple_dump_csv(self, cmd):
from ckan import model
@@ -232,7 +251,7 @@
'''Creates a search index for all datasets
Usage:
- search-index rebuild - indexes all packages (default)
+ search-index rebuild - indexes all packages
search-index check - checks for packages not indexed
search-index show {package-name} - shows index of a package
search-index clear - clears the search index for this ckan instance
@@ -248,11 +267,11 @@
from ckan.lib.search import rebuild, check, show, clear
if not self.args:
- # default to run
- cmd = 'rebuild'
- else:
- cmd = self.args[0]
-
+ # default to printing help
+ print self.usage
+ return
+
+ cmd = self.args[0]
if cmd == 'rebuild':
rebuild()
elif cmd == 'check':
https://bitbucket.org/okfn/ckan/changeset/35542f1c60a2/
changeset: 35542f1c60a2
branch: release-v1.5
user: dread
date: 2011-11-02 12:46:08
summary: [config,deb]: #1441 Use local CKAN logo image.
affected #: 2 files
diff -r 9e51df5c496b9c08cfb108b79e9e65a591e2daae -r 35542f1c60a2adf2bc5b45da6c5d6ade0e7dec14 ckan/config/deployment.ini_tmpl
--- a/ckan/config/deployment.ini_tmpl
+++ b/ckan/config/deployment.ini_tmpl
@@ -116,8 +116,8 @@
## Title of site (using in several places including templates and <title> tag
ckan.site_title = CKAN
-## Logo image to use (replaces site_title string on front page if defined)
-ckan.site_logo = http://assets.okfn.org/p/ckan/img/ckan_logo_box.png
+## Logo image to use on the home page
+ckan.site_logo = /img/logo.png
## Site tagline / description (used on front page)
ckan.site_description =
diff -r 9e51df5c496b9c08cfb108b79e9e65a591e2daae -r 35542f1c60a2adf2bc5b45da6c5d6ade0e7dec14 ckan_deb/usr/lib/ckan/common.sh
--- a/ckan_deb/usr/lib/ckan/common.sh
+++ b/ckan_deb/usr/lib/ckan/common.sh
@@ -108,7 +108,6 @@
-e "s,^\(cache_dir\)[ =].*,\1 = /var/lib/ckan/${INSTANCE}/data," \
-e "s,^\(who\.config_file\)[ =].*,\1 = /etc/ckan/${INSTANCE}/who.ini," \
-e "s,^\(sqlalchemy.url\)[ =].*,\1 = postgresql://${INSTANCE}:${password}@localhost/${INSTANCE}," \
- -e "s,ckan\.site_logo,\#ckan.site_logo," \
-e "s,ckan\.log,/var/log/ckan/${INSTANCE}/${INSTANCE}.log," \
-e "s,ckan\.site_id,${INSTANCE}," \
-e "s,ckan\.site_description,${INSTANCE}," \
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