Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 214 lines (139 sloc) 6.823 kb
f26df0a @fwenzel oops, Firefox Input, not Mozilla Input
fwenzel authored
1 Firefox Input
e6eae89 @fwenzel Production app will be called Mozilla Input. Codename remains reporter.
fwenzel authored
2 =============
f22df3b @fwenzel README file.
fwenzel authored
3
6e6fe4c @fwenzel freeing product details from the claws of the reporter app.
fwenzel authored
4 Firefox Input is a [Django][Django]-based web application to gather user
5 feedback from the [Mozilla][Mozilla] Firefox beta testing program.
f22df3b @fwenzel README file.
fwenzel authored
6
7 For project goals, specifications, etc., check out the
1db2b52 Changed the name 'Reporter' to 'Input'
Aakash Desai authored
8 [Input Wiki Page][wikimo].
f22df3b @fwenzel README file.
fwenzel authored
9
10 [Mozilla]: http://www.mozilla.org
11 [Django]: http://www.djangoproject.com/
e6eae89 @fwenzel Production app will be called Mozilla Input. Codename remains reporter.
fwenzel authored
12 [wikimo]: https://wiki.mozilla.org/Firefox/Input
f22df3b @fwenzel README file.
fwenzel authored
13
4b4564e @willkg Update README
willkg authored
14
f22df3b @fwenzel README file.
fwenzel authored
15 Getting Started
16 ---------------
4b4564e @willkg Update README
willkg authored
17
18 ### Git
19
20 Get the code:
21
22 git clone git@github.com:mozilla/input.mozilla.org.git input-site
23
24 Make sure that the directory it creates is not input.mozilla.org because
25 manage.py adds the top-level directory to the PYTHONPATH and then it
26 thinks that input.mozilla.org is a Python module and then it all breaks.
27
28
f22df3b @fwenzel README file.
fwenzel authored
29 ### Python
4b4564e @willkg Update README
willkg authored
30
31 You need Python 2.6.
32
33 Also, you probably want to run this application in a
f22df3b @fwenzel README file.
fwenzel authored
34 [virtualenv][virtualenv] environment.
35
4b4564e @willkg Update README
willkg authored
36 Run:
6b762b8 @fwenzel messing around with requirements to accommodate a vendor lib
fwenzel authored
37
38 easy_install pip
39
4b4564e @willkg Update README
willkg authored
40 followed by:
6b762b8 @fwenzel messing around with requirements to accommodate a vendor lib
fwenzel authored
41
42 pip install -r requirements/prod.txt -r requirements/compiled.txt
43
f22df3b @fwenzel README file.
fwenzel authored
44 to install the required Python libraries.
45
46 [virtualenv]: http://pypi.python.org/pypi/virtualenv
47
1a17b5f @fwenzel (hopefully) removed all traces of haystack.
fwenzel authored
48
f22df3b @fwenzel README file.
fwenzel authored
49 ### Django
4b4564e @willkg Update README
willkg authored
50
5fd6c3b @davedash DB instructions
davedash authored
51 Put your database settings in `settings_local.py`:
52
53 from settings import *
54
55 # ...
56
57 DATABASES = {
58 'default': {
59 'ENGINE': 'mysql',
60 'NAME': 'firefox_input',
4b4564e @willkg Update README
willkg authored
61 'USER': 'input',
62 'PASSWORD': 'input',
5fd6c3b @davedash DB instructions
davedash authored
63 'HOST': 'localhost',
64 'PORT': '',
65 'OPTIONS': {'init_command': 'SET storage_engine=InnoDB',
66 'charset' : 'utf8',
67 'use_unicode' : True,
68 },
fc8f7c0 @fwenzel Re-enabling website issues (and buttons) post-prod-push.
fwenzel authored
69 },
70 'website_issues': {
71 'ENGINE': 'mysql',
72 # ...
5fd6c3b @davedash DB instructions
davedash authored
73 }
74 }
75
4b4564e @willkg Update README
willkg authored
76 Make sure you create the database and user you've specified:
77
78 $ mysql -u root -p
79 mysql> CREATE DATABASE firefox_input;
80 mysql> GRANT ALL ON firefox_input.* TO input@localhost IDENTIFIED BY 'input';
81 mysql> GRANT ALL ON test_firefox_input.* TO input@localhost IDENTIFIED BY 'input';
82 mysql> CREATE DATABASE website_issues;
83 mysql> GRANT ALL ON website_issues.* TO input@localhost IDENTIFIED BY 'input';
84 mysql> GRANT ALL ON test_website_issues.* TO input@localhost IDENTIFIED BY 'input';
85
891dc50 @willkg Minor tweaks to README.md
willkg authored
86 To initialize the database, run:
6e6fe4c @fwenzel freeing product details from the claws of the reporter app.
fwenzel authored
87
4b4564e @willkg Update README
willkg authored
88 $ ./manage.py syncdb
6e6fe4c @fwenzel freeing product details from the claws of the reporter app.
fwenzel authored
89
f555bcc @x1B Added documentation on schematic calls.
x1B authored
90 To update your schemas from an earlier version:
91
4b4564e @willkg Update README
willkg authored
92 $ DJANGO_SETTINGS_MODULE=settings ./vendor/src/schematic/schematic migrations
f555bcc @x1B Added documentation on schematic calls.
x1B authored
93
fab8481 @fwenzel Advice on update_product_details as cron job and pulling from git.
fwenzel authored
94 To initialize the search index, run:
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
95
4b4564e @willkg Update README
willkg authored
96 $ ./manage.py update_index
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
97
f22df3b @fwenzel README file.
fwenzel authored
98 The Internet has plenty of of documentation on setting up a Django application
99 with any web server. If you need a wsgi entry point, you can find one in
100 ``wsgi/reporter.wsgi``.
101
4b4564e @willkg Update README
willkg authored
102
103 ### Highcharts
104
105 Due to licensing issues, we can't rightfully bundle highcharts.js. So you can
106 go get it using:
107
108 $ ./manage.py cron get_highcharts
109
110
111 ### Sphinx
112
113 For searching, we use [Sphinx][sphinx]. Set up an instance of it, and adjust
114 the SPHINX\_\* settings in settings.py to match your setup.
115
891dc50 @willkg Minor tweaks to README.md
willkg authored
116 See docs/sphinxsearch.rst for more details.
117
4b4564e @willkg Update README
willkg authored
118 [sphinx]: http://www.sphinxsearch.com/
119
120
79ad4b7 @x1B Better documentation for Sites
x1B authored
121 ### Sites data
4b4564e @willkg Update README
willkg authored
122
f1f3f7f @x1B Added instruction to README to use a separate database for website_issue...
x1B authored
123 The "website\_issues" database has to be a separate SQL-database from
124 "default", as it uses its own schematic migration version.
79ad4b7 @x1B Better documentation for Sites
x1B authored
125 It is used to load aggregate website issues (generated by clustering) from a
126 cron task. To initialize it, run:
127
4b4564e @willkg Update README
willkg authored
128 $ ./manage.py syncdb --database=website_issues
79ad4b7 @x1B Better documentation for Sites
x1B authored
129
4b4564e @willkg Update README
willkg authored
130 To generate site data yourself without getting it pushed from metrics, run:
79ad4b7 @x1B Better documentation for Sites
x1B authored
131
4b4564e @willkg Update README
willkg authored
132 $ ./manage.py generate_sites
79ad4b7 @x1B Better documentation for Sites
x1B authored
133
f555bcc @x1B Added documentation on schematic calls.
x1B authored
134 And for schema updates:
135
4b4564e @willkg Update README
willkg authored
136 $ DJANGO_SETTINGS_MODULE=settings ./vendor/src/schematic/schematic migrations/sites
137
f555bcc @x1B Added documentation on schematic calls.
x1B authored
138
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
139 ### Cron jobs
4b4564e @willkg Update README
willkg authored
140
fab8481 @fwenzel Advice on update_product_details as cron job and pulling from git.
fwenzel authored
141 There are two jobs you may want to run periodically:
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
142
4b4564e @willkg Update README
willkg authored
143 $ ./manage.py update_product_details # Mozilla Product Details update
144 $ ./manage.py update_index -r # update and rotate search index
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
145
146 The frequency is up to you, but you probably want to run the search index
147 updates relatively frequently, while the product details can wait a little
148 longer.
149
fab8481 @fwenzel Advice on update_product_details as cron job and pulling from git.
fwenzel authored
150 Note that updating the product details files like this will lead to "local
151 changes" in your checkout. If you plan on pulling code updates from git
152 periodically, you should leave ``lib/product_details_json`` untouched, but
153 create a new directory somewhere else and change the setting
154 ``PROD_DETAILS_DIR`` accordingly.
155
4b4564e @willkg Update README
willkg authored
156
24b19dd @fwenzel mobile site framework, serving desktop site on site ID 1, and mobile on ...
fwenzel authored
157 ### Mobile vs. Desktop site
4b4564e @willkg Update README
willkg authored
158
24b19dd @fwenzel mobile site framework, serving desktop site on site ID 1, and mobile on ...
fwenzel authored
159 We are using the [Django Sites Framework][sites] to distinguish between the
160 mobile site and the desktop site. The default is site ID 1 == desktop. If
161 you create another site using the admin interface, requests for that site's
162 domain will show the mobile site (set ``settings.MOBILE_SITE_ID`` accordingly,
163 though the default of 2 is probably correct).
164
165 For development, you can create an alias of localhost (``m.localhost``, for
166 example) in ``/etc/hosts``, and use that as the domain for the second site.
167 Make sure to include the port (``m.localhost:8000``).
168
169 [sites]: http://docs.djangoproject.com/en/dev/ref/contrib/sites/
170
171
f22df3b @fwenzel README file.
fwenzel authored
172 License
173 -------
4b4564e @willkg Update README
willkg authored
174
f22df3b @fwenzel README file.
fwenzel authored
175 This software is licensed under the [Mozilla Tri-License][MPL]:
176
177 ***** BEGIN LICENSE BLOCK *****
178 Version: MPL 1.1/GPL 2.0/LGPL 2.1
179
180 The contents of this file are subject to the Mozilla Public License Version
181 1.1 (the "License"); you may not use this file except in compliance with
182 the License. You may obtain a copy of the License at
183 http://www.mozilla.org/MPL/
184
185 Software distributed under the License is distributed on an "AS IS" basis,
186 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
187 for the specific language governing rights and limitations under the
188 License.
189
f26df0a @fwenzel oops, Firefox Input, not Mozilla Input
fwenzel authored
190 The Original Code is Firefox Input.
f22df3b @fwenzel README file.
fwenzel authored
191
192 The Initial Developer of the Original Code is Mozilla.
193 Portions created by the Initial Developer are Copyright (C) 2010
194 the Initial Developer. All Rights Reserved.
195
196 Contributor(s):
197 Frederic Wenzel <fwenzel@mozilla.com>
198
199 Alternatively, the contents of this file may be used under the terms of
200 either the GNU General Public License Version 2 or later (the "GPL"), or
201 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
202 in which case the provisions of the GPL or the LGPL are applicable instead
203 of those above. If you wish to allow use of your version of this file only
204 under the terms of either the GPL or the LGPL, and not to allow others to
205 use your version of this file under the terms of the MPL, indicate your
206 decision by deleting the provisions above and replace them with the notice
207 and other provisions required by the GPL or the LGPL. If you do not delete
208 the provisions above, a recipient may use your version of this file under
209 the terms of any one of the MPL, the GPL or the LGPL.
210
211 ***** END LICENSE BLOCK *****
212
213 [MPL]: http://www.mozilla.org/MPL/
Something went wrong with that request. Please try again.