Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 158 lines (113 sloc) 5.383 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
fc8f7c0 @fwenzel Re-enabling website issues (and buttons) post-prod-push.
fwenzel authored
70 The second database can be the same as the first. It is used to load aggregate
71 website issues (generated by clustering) from a cron task. They are displayed
72 by the website_issues app (``/<locale>/sites`` urls).
73 To load example site data without getting it pushed from metrics, run
74
75 ./manage.py generate_sites
76
6e6fe4c @fwenzel freeing product details from the claws of the reporter app.
fwenzel authored
77 To initialize the database, run:
78
79 ./manage.py syncdb
80
81 and to fetch the initial product details data, run:
82
83 ./manage.py update_product_details
84
1a17b5f @fwenzel (hopefully) removed all traces of haystack.
fwenzel authored
85 Finally, to initialize the search index, run:
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
86
1a17b5f @fwenzel (hopefully) removed all traces of haystack.
fwenzel authored
87 ./manage.py update_index
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
88
f22df3b @fwenzel README file.
fwenzel authored
89 The Internet has plenty of of documentation on setting up a Django application
90 with any web server. If you need a wsgi entry point, you can find one in
91 ``wsgi/reporter.wsgi``.
92
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
93 ### Cron jobs
94 There are two jobs you want to run periodically:
95
96 ./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
97 ./manage.py update_index # update and rotate search index
7ab592a @fwenzel half-done search page. Need: aggregates, narrowing options.
fwenzel authored
98
99 The frequency is up to you, but you probably want to run the search index
100 updates relatively frequently, while the product details can wait a little
101 longer.
102
24b19dd @fwenzel mobile site framework, serving desktop site on site ID 1, and mobile on ...
fwenzel authored
103 ### Mobile vs. Desktop site
104 We are using the [Django Sites Framework][sites] to distinguish between the
105 mobile site and the desktop site. The default is site ID 1 == desktop. If
106 you create another site using the admin interface, requests for that site's
107 domain will show the mobile site (set ``settings.MOBILE_SITE_ID`` accordingly,
108 though the default of 2 is probably correct).
109
110 For development, you can create an alias of localhost (``m.localhost``, for
111 example) in ``/etc/hosts``, and use that as the domain for the second site.
112 Make sure to include the port (``m.localhost:8000``).
113
114 [sites]: http://docs.djangoproject.com/en/dev/ref/contrib/sites/
115
116
f22df3b @fwenzel README file.
fwenzel authored
117 License
118 -------
119 This software is licensed under the [Mozilla Tri-License][MPL]:
120
121 ***** BEGIN LICENSE BLOCK *****
122 Version: MPL 1.1/GPL 2.0/LGPL 2.1
123
124 The contents of this file are subject to the Mozilla Public License Version
125 1.1 (the "License"); you may not use this file except in compliance with
126 the License. You may obtain a copy of the License at
127 http://www.mozilla.org/MPL/
128
129 Software distributed under the License is distributed on an "AS IS" basis,
130 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
131 for the specific language governing rights and limitations under the
132 License.
133
f26df0a @fwenzel oops, Firefox Input, not Mozilla Input
fwenzel authored
134 The Original Code is Firefox Input.
f22df3b @fwenzel README file.
fwenzel authored
135
136 The Initial Developer of the Original Code is Mozilla.
137 Portions created by the Initial Developer are Copyright (C) 2010
138 the Initial Developer. All Rights Reserved.
139
140 Contributor(s):
141 Frederic Wenzel <fwenzel@mozilla.com>
142
143 Alternatively, the contents of this file may be used under the terms of
144 either the GNU General Public License Version 2 or later (the "GPL"), or
145 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
146 in which case the provisions of the GPL or the LGPL are applicable instead
147 of those above. If you wish to allow use of your version of this file only
148 under the terms of either the GPL or the LGPL, and not to allow others to
149 use your version of this file under the terms of the MPL, indicate your
150 decision by deleting the provisions above and replace them with the notice
151 and other provisions required by the GPL or the LGPL. If you do not delete
152 the provisions above, a recipient may use your version of this file under
153 the terms of any one of the MPL, the GPL or the LGPL.
154
155 ***** END LICENSE BLOCK *****
156
157 [MPL]: http://www.mozilla.org/MPL/
Something went wrong with that request. Please try again.