Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 162 lines (115 sloc) 5.432 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
8 [Reporter Wiki Page][wikimo].
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
14 Getting Started
15 ---------------
16 ### Python
17 You need Python 2.6. Also, you probably want to run this application in a
18 [virtualenv][virtualenv] environment.
19
6b762b8 @fwenzel messing around with requirements to accommodate a vendor lib
fwenzel authored
20 Run
21
22 easy_install pip
23
24 followed by
25
26 pip install -r requirements/prod.txt -r requirements/compiled.txt
27
f22df3b @fwenzel README file.
fwenzel authored
28 to install the required Python libraries.
29
30 [virtualenv]: http://pypi.python.org/pypi/virtualenv
31
1a17b5f @fwenzel (hopefully) removed all traces of haystack.
fwenzel authored
32 ### Sphinx
33
34 For searching, we use [Sphinx][sphinx]. Set up an instance of it, and adjust
35 the SPHINX\_\* settings in settings.py to match your setup. There are three
36 management commands to go with it:
37
38 * ``start_sphinx`` starts the sphinx daemon
39 * ``stop_sphinx`` stops it
40 * ``update_index`` updates the search index (see below)
41
42 [sphinx]: http://www.sphinxsearch.com/
43
f22df3b @fwenzel README file.
fwenzel authored
44 ### Django
5fd6c3b @davedash DB instructions
davedash authored
45 Put your database settings in `settings_local.py`:
46
47 from settings import *
48
49 # ...
50
51 DATABASES = {
52 'default': {
53 'ENGINE': 'mysql',
54 'NAME': 'firefox_input',
55 'USER': 'root',
56 'PASSWORD': '',
57 'HOST': 'localhost',
58 'PORT': '',
59 'OPTIONS': {'init_command': 'SET storage_engine=InnoDB',
60 'charset' : 'utf8',
61 'use_unicode' : True,
62 },
fc8f7c0 @fwenzel Re-enabling website issues (and buttons) post-prod-push.
fwenzel authored
63 },
64 'website_issues': {
65 'ENGINE': 'mysql',
66 # ...
5fd6c3b @davedash DB instructions
davedash authored
67 }
68 }
69
6e6fe4c @fwenzel freeing product details from the claws of the reporter app.
fwenzel authored
70 To initialize the database, run:
71
72 ./manage.py syncdb
73
79ad4b7 @x1B Better documentation for Sites
x1B authored
74 And to fetch the initial product details data, run:
6e6fe4c @fwenzel freeing product details from the claws of the reporter app.
fwenzel authored
75
76 ./manage.py update_product_details
77
79ad4b7 @x1B Better documentation for Sites
x1B authored
78 finally, to initialize the search index, run:
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
79
1a17b5f @fwenzel (hopefully) removed all traces of haystack.
fwenzel authored
80 ./manage.py update_index
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
81
f22df3b @fwenzel README file.
fwenzel authored
82 The Internet has plenty of of documentation on setting up a Django application
83 with any web server. If you need a wsgi entry point, you can find one in
84 ``wsgi/reporter.wsgi``.
85
79ad4b7 @x1B Better documentation for Sites
x1B authored
86 ### Sites data
87 The "website_issues" database can use the same SQL-database as the "default".
88 It is used to load aggregate website issues (generated by clustering) from a
89 cron task. To initialize it, run:
90
91 ./manage.py syncdb --database=website_issues
92
93 To generate site data yourself without getting it pushed from metrics, run
94
95 ./manage.py generate_sites
96
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
97 ### Cron jobs
98 There are two jobs you want to run periodically:
99
100 ./manage.py update_product_details # Mozilla Product Details update
24b19dd @fwenzel mobile site framework, serving desktop site on site ID 1, and mobile on ...
fwenzel authored
101 ./manage.py update_index # update and rotate search index
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
102
103 The frequency is up to you, but you probably want to run the search index
104 updates relatively frequently, while the product details can wait a little
105 longer.
106
24b19dd @fwenzel mobile site framework, serving desktop site on site ID 1, and mobile on ...
fwenzel authored
107 ### Mobile vs. Desktop site
108 We are using the [Django Sites Framework][sites] to distinguish between the
109 mobile site and the desktop site. The default is site ID 1 == desktop. If
110 you create another site using the admin interface, requests for that site's
111 domain will show the mobile site (set ``settings.MOBILE_SITE_ID`` accordingly,
112 though the default of 2 is probably correct).
113
114 For development, you can create an alias of localhost (``m.localhost``, for
115 example) in ``/etc/hosts``, and use that as the domain for the second site.
116 Make sure to include the port (``m.localhost:8000``).
117
118 [sites]: http://docs.djangoproject.com/en/dev/ref/contrib/sites/
119
120
f22df3b @fwenzel README file.
fwenzel authored
121 License
122 -------
123 This software is licensed under the [Mozilla Tri-License][MPL]:
124
125 ***** BEGIN LICENSE BLOCK *****
126 Version: MPL 1.1/GPL 2.0/LGPL 2.1
127
128 The contents of this file are subject to the Mozilla Public License Version
129 1.1 (the "License"); you may not use this file except in compliance with
130 the License. You may obtain a copy of the License at
131 http://www.mozilla.org/MPL/
132
133 Software distributed under the License is distributed on an "AS IS" basis,
134 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
135 for the specific language governing rights and limitations under the
136 License.
137
f26df0a @fwenzel oops, Firefox Input, not Mozilla Input
fwenzel authored
138 The Original Code is Firefox Input.
f22df3b @fwenzel README file.
fwenzel authored
139
140 The Initial Developer of the Original Code is Mozilla.
141 Portions created by the Initial Developer are Copyright (C) 2010
142 the Initial Developer. All Rights Reserved.
143
144 Contributor(s):
145 Frederic Wenzel <fwenzel@mozilla.com>
146
147 Alternatively, the contents of this file may be used under the terms of
148 either the GNU General Public License Version 2 or later (the "GPL"), or
149 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
150 in which case the provisions of the GPL or the LGPL are applicable instead
151 of those above. If you wish to allow use of your version of this file only
152 under the terms of either the GPL or the LGPL, and not to allow others to
153 use your version of this file under the terms of the MPL, indicate your
154 decision by deleting the provisions above and replace them with the notice
155 and other provisions required by the GPL or the LGPL. If you do not delete
156 the provisions above, a recipient may use your version of this file under
157 the terms of any one of the MPL, the GPL or the LGPL.
158
159 ***** END LICENSE BLOCK *****
160
161 [MPL]: http://www.mozilla.org/MPL/
Something went wrong with that request. Please try again.