| 30 | |
| 31 | == Installation |
| 32 | |
| 33 | This macro requires the [https://bitbucket.org/prologic/pymills pymills] library and it makes use of its '''db''' and '''table''' modules. Please install pymills first. |
| 34 | |
| 35 | {{{#!sh |
| 36 | wget https://bitbucket.org/prologic/pymills/get/0d1424e1b0ab.zip |
| 37 | unzip 0d1424e1b0ab.zip |
| 38 | easy_install $PWD/prologic-pymills-0d1424e1b0ab |
| 39 | }}} |
| 40 | |
| 41 | To install the macro: |
| 42 | |
| 43 | {{{#!sh |
| 44 | easy_install TracSqlQueryMacro |
| 45 | }}} |
| 46 | |
| 47 | To enable in your `trac.ini` file: |
| 48 | |
| 49 | {{{#!ini |
| 50 | [components] |
| 51 | sqlquery.* = enabled |
| 52 | }}} |
| 53 | |
| 54 | == Configuration |
| 55 | |
| 56 | To configure this plugin, you must tell SQLQuery what database to connect to. |
| 57 | |
| 58 | In `trac.ini` or via the WebAdmin menu: |
| 59 | |
| 60 | {{{#!ini |
| 61 | [sqlquery] |
| 62 | uri = mysql://user:password@hostname/database |
| 63 | }}} |
| 64 | |
| 65 | You can also use Oracle or SQLite: |
| 66 | |
| 67 | {{{#!ini |
| 68 | [sqlquery] |
| 69 | uri = oracle://user:password@tns |
| 70 | }}} |
| 71 | |
| 72 | or: |
| 73 | |
| 74 | {{{#!ini |
| 75 | [sqlquery] |
| 76 | uri = sqlite:///path/to/db |
| 77 | }}} |
43 | | == Installation |
44 | | |
45 | | This macro requires the [https://bitbucket.org/prologic/pymills pymills] library and makes use of its '''db''' and '''table''' modules. Please install pymills first. |
46 | | |
47 | | {{{ |
48 | | #!sh |
49 | | wget https://bitbucket.org/prologic/pymills/get/0d1424e1b0ab.zip |
50 | | unzip 0d1424e1b0ab.zip |
51 | | easy_install $PWD/prologic-pymills-0d1424e1b0ab |
52 | | }}} |
53 | | |
54 | | To install the macro: |
55 | | |
56 | | {{{ |
57 | | #!sh |
58 | | easy_install TracSqlQueryMacro |
59 | | }}} |
60 | | |
61 | | To enable in `trac.ini`: |
62 | | |
63 | | {{{ |
64 | | #!ini |
65 | | [components] |
66 | | sqlquery.* = enabled |
67 | | }}} |
68 | | |
69 | | == Configuration |
70 | | |
71 | | To configure this plugin, you must tell sqlquery what database to connect to: |
72 | | |
73 | | In `trac.ini` or via the WebAdmin menu: |
74 | | |
75 | | {{{ |
76 | | #!ini |
77 | | [sqlquery] |
78 | | uri = mysql://user:password@hostname/database |
79 | | }}} |
80 | | |
81 | | You can also use Oracle or SQLite: |
82 | | |
83 | | {{{ |
84 | | #!ini |
85 | | uri = oracle://user:password@tns |
86 | | }}} |
87 | | |
88 | | or: |
89 | | |
90 | | {{{ |
91 | | #!ini |
92 | | uri = sqlite:///path/to/db |
93 | | }}} |
94 | | |