Merge lp:~giuseppeterrasi-deactivatedaccount/ubuntu-it-ask/1022223 into lp:~ubuntu-it-ask/ubuntu-it-ask/dev

Proposed by Giuseppe Terrasi
Status: Merged
Merged at revision: 58
Proposed branch: lp:~giuseppeterrasi-deactivatedaccount/ubuntu-it-ask/1022223
Merge into: lp:~ubuntu-it-ask/ubuntu-it-ask/dev
Diff against target: 118 lines (+22/-11)
5 files modified
00-FIXME (+5/-1)
00-README (+8/-1)
forum_modules/pgfulltext/handlers.py (+2/-2)
forum_modules/pgfulltext/pg_fts_install.sql (+4/-4)
settings_local.py (+3/-3)
To merge this branch: bzr merge lp:~giuseppeterrasi-deactivatedaccount/ubuntu-it-ask/1022223
Reviewer Review Type Date Requested Status
Ubuntu-it Ask Pending
Review via email: mp+118262@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '00-FIXME'
--- 00-FIXME 2012-08-03 19:06:00 +0000
+++ 00-FIXME 2012-08-05 06:03:19 +0000
@@ -18,7 +18,7 @@
1818
19= settings_local.py =19= settings_local.py =
2020
21Disabilitati i seguenti moduli, di default abilitati: mysqlfulltext, localauth, oauthauth, facebookauth21Disabilitati i seguenti moduli, di default abilitati: mysqlfulltext, localauth, oauthauth, facebookauth, sphinxfulltext
2222
23= forum/skins/light/media/js/wmd/wmd.js =23= forum/skins/light/media/js/wmd/wmd.js =
2424
@@ -51,3 +51,7 @@
5151
52= forum/templatetags/extra_tags.py =52= forum/templatetags/extra_tags.py =
53FIXME: proporre cambiamento upstream come da lp:~giuseppeterrasi/ubuntu-it-ask/l18ned53FIXME: proporre cambiamento upstream come da lp:~giuseppeterrasi/ubuntu-it-ask/l18ned
54
55= forum_modules/pgfulltext =
56
57sostituito "english" con "italian"
5458
=== modified file '00-README'
--- 00-README 2012-07-20 20:58:48 +0000
+++ 00-README 2012-08-05 06:03:19 +0000
@@ -27,13 +27,14 @@
27 c) timezone in Europe/Rome27 c) timezone in Europe/Rome
28 d) languages in IT28 d) languages in IT
29 e) DJANGO_VERSION = 1.329 e) DJANGO_VERSION = 1.3
30 f) DISABLED_MODULES add 'mysqlfulltxt', 'localauth'30 f) DISABLED_MODULES add 'mysqlfulltxt', 'localauth' 'sphinxfullsearch'
31 g) CACHE_BACKEND = 'memcached://<server-address>:<port>/ with the correct path.31 g) CACHE_BACKEND = 'memcached://<server-address>:<port>/ with the correct path.
325) python manage.py syncdb --all (no create super user)325) python manage.py syncdb --all (no create super user)
336) python manage.py migrate forum --fake336) python manage.py migrate forum --fake
347) cp -R locale l it347) cp -R locale l it
358) python manage.py makemessages -l it358) python manage.py makemessages -l it
3636
37
37** Note: an example of settings_local.py with right database settings (line 27): http://bazaar.launchpad.net/~ubuntu-it-ask/ubuntu-it-ask/trunk/view/head:/settings_local.py38** Note: an example of settings_local.py with right database settings (line 27): http://bazaar.launchpad.net/~ubuntu-it-ask/ubuntu-it-ask/trunk/view/head:/settings_local.py
3839
3940
@@ -52,6 +53,12 @@
5253
53(if you need a dump of this table, please use: pg_dump ubuntu-it-chiedi --clean -O -t forum_keyvalue -f forum_keyvalue.sql -U ubuntu-it-chiedi -W )54(if you need a dump of this table, please use: pg_dump ubuntu-it-chiedi --clean -O -t forum_keyvalue -f forum_keyvalue.sql -U ubuntu-it-chiedi -W )
5455
56= Configure pgfulltext =
57
581) cd forum_modules/pgfulltext
592) psql -U ubuntu-it-chiedi ubuntu-it-chiedi -W < pg_fts_install.sql
603) python /src/CHANGE_THIS_PATH/www/osqa/manage.py syncdb
61
55= Other =62= Other =
5663
57We can perform other changes, if needed, using bzr with no access on64We can perform other changes, if needed, using bzr with no access on
5865
=== modified file 'forum_modules/pgfulltext/handlers.py'
--- forum_modules/pgfulltext/handlers.py 2012-06-22 20:37:14 +0000
+++ forum_modules/pgfulltext/handlers.py 2012-08-05 06:03:19 +0000
@@ -16,11 +16,11 @@
16 tables = ['forum_rootnode_doc'],16 tables = ['forum_rootnode_doc'],
17 select={17 select={
18 'ranking': """18 'ranking': """
19 rank_exact_matches(ts_rank_cd('{0.1, 0.2, 0.8, 1.0}'::float4[], "forum_rootnode_doc"."document", to_tsquery('english', %s), 32))19 rank_exact_matches(ts_rank_cd('{0.1, 0.2, 0.8, 1.0}'::float4[], "forum_rootnode_doc"."document", to_tsquery('italian', %s), 32))
20 """,20 """,
21 },21 },
22 where=["""22 where=["""
23 "forum_rootnode_doc"."node_id" = "forum_node"."id" AND ("forum_rootnode_doc"."document" @@ to_tsquery('english', %s) OR23 "forum_rootnode_doc"."node_id" = "forum_node"."id" AND ("forum_rootnode_doc"."document" @@ to_tsquery('italian', %s) OR
24 "forum_node"."title" ILIKE %s)24 "forum_node"."title" ILIKE %s)
25 """],25 """],
26 params=[tsquery, ilike],26 params=[tsquery, ilike],
2727
=== modified file 'forum_modules/pgfulltext/pg_fts_install.sql'
--- forum_modules/pgfulltext/pg_fts_install.sql 2012-06-22 20:37:14 +0000
+++ forum_modules/pgfulltext/pg_fts_install.sql 2012-08-05 06:03:19 +0000
@@ -54,15 +54,15 @@
54 END IF;54 END IF;
5555
56 SELECT56 SELECT
57 setweight(to_tsvector('english', coalesce(tagnames,'')), 'A') ||57 setweight(to_tsvector('italian', coalesce(tagnames,'')), 'A') ||
58 setweight(to_tsvector('english', coalesce(title,'')), 'B') ||58 setweight(to_tsvector('italian', coalesce(title,'')), 'B') ||
59 setweight(to_tsvector('english', coalesce(body,'')), 'C') INTO doc59 setweight(to_tsvector('italian', coalesce(body,'')), 'C') INTO doc
60 FROM forum_node WHERE id = root_id;60 FROM forum_node WHERE id = root_id;
6161
62 SELECT count(*)::int INTO rcount FROM forum_node WHERE abs_parent_id = root_id AND (NOT state_string LIKE '%%deleted%%');62 SELECT count(*)::int INTO rcount FROM forum_node WHERE abs_parent_id = root_id AND (NOT state_string LIKE '%%deleted%%');
6363
64 IF rcount > 0 THEN64 IF rcount > 0 THEN
65 FOR cv in SELECT setweight(to_tsvector('english', coalesce(body,'')), 'C') FROM forum_node WHERE abs_parent_id = root_id AND (NOT state_string LIKE '%%deleted%%') LOOP65 FOR cv in SELECT setweight(to_tsvector('italian', coalesce(body,'')), 'C') FROM forum_node WHERE abs_parent_id = root_id AND (NOT state_string LIKE '%%deleted%%') LOOP
66 doc :=(doc || cv);66 doc :=(doc || cv);
67 END LOOP;67 END LOOP;
68 END IF;68 END IF;
6969
=== modified file 'settings_local.py'
--- settings_local.py 2012-07-15 16:14:56 +0000
+++ settings_local.py 2012-08-05 06:03:19 +0000
@@ -46,7 +46,7 @@
46# This should be equal to your domain name, plus the web application context.46# This should be equal to your domain name, plus the web application context.
47# This shouldn't be followed by a trailing slash.47# This shouldn't be followed by a trailing slash.
48# I.e., http://www.yoursite.com or http://www.hostedsite.com/yourhostapp48# I.e., http://www.yoursite.com or http://www.hostedsite.com/yourhostapp
49APP_URL = 'http://CHANGE_THIS_PATH'49APP_URL = 'http://chiedi.ubuntu-it.org'
5050
51#LOCALIZATIONS51#LOCALIZATIONS
52TIME_ZONE = 'Europe/Rome'52TIME_ZONE = 'Europe/Rome'
@@ -57,7 +57,7 @@
57LANGUAGE_CODE = 'it'57LANGUAGE_CODE = 'it'
5858
59DJANGO_VERSION = 1.359DJANGO_VERSION = 1.3
60OSQA_DEFAULT_SKIN = 'default'60OSQA_DEFAULT_SKIN = 'light'
6161
62# disable mysqlfulltxt and local authentication (registrations users)62# disable mysqlfulltxt and local authentication (registrations users)
63DISABLED_MODULES = ['books', 'recaptcha', 'project_badges', 'mysqlfulltext', 'localauth', 'oauthauth', 'facebookauth']63DISABLED_MODULES = ['books', 'recaptcha', 'project_badges', 'mysqlfulltext', 'localauth', 'oauthauth', 'facebookauth', 'sphinxfulltext']

Subscribers

No one subscribed via source and target branches