|
1 Metadata-Version: 1.0 |
|
2 Name: djangorecipe |
|
3 Version: 0.20 |
|
4 Summary: Buildout recipe for Django |
|
5 Home-page: https://launchpad.net/djangorecipe |
|
6 Author: Jeroen Vloothuis |
|
7 Author-email: jeroen.vloothuis@xs4all.nl |
|
8 License: BSD |
|
9 Description: Description |
|
10 =========== |
|
11 |
|
12 This buildout recipe can be used to create a setup for Django. It will |
|
13 automatically download Django and install it in the buildout's |
|
14 sandbox. You can use either a release version of Django or a |
|
15 subversion checkout (by using `trunk` instead of a version number. |
|
16 |
|
17 You can see an example of how to use the recipe below:: |
|
18 |
|
19 [buildout] |
|
20 parts = satchmo django |
|
21 eggs = ipython |
|
22 |
|
23 [satchmo] |
|
24 recipe = gocept.download |
|
25 url = http://www.satchmoproject.com/snapshots/satchmo-0.6.tar.gz |
|
26 md5sum = 659a4845c1c731be5cfe29bfcc5d14b1 |
|
27 |
|
28 [django] |
|
29 recipe = djangorecipe |
|
30 version = trunk |
|
31 settings = development |
|
32 eggs = ${buildout:eggs} |
|
33 extra-paths = |
|
34 ${satchmo:location} |
|
35 project = dummyshop |
|
36 |
|
37 |
|
38 Supported options |
|
39 ================= |
|
40 |
|
41 The recipe supports the following options. |
|
42 |
|
43 project |
|
44 This option sets the name for your project. The recipe will create a |
|
45 basic structure if the project is not already there. |
|
46 |
|
47 projectegg |
|
48 Use this instead of the project option when you want to use an egg |
|
49 as the project. This disables the generation of the project |
|
50 structure. |
|
51 |
|
52 python |
|
53 This option can be used to specify a specific Python version which can be a |
|
54 different version from the one used to run the buildout. |
|
55 |
|
56 version |
|
57 The version argument can accept a few different types of |
|
58 arguments. You can specify `trunk`. In this case it will do a |
|
59 checkout of the Django trunk. Another option is to specify a release |
|
60 number like `0.96.2`. This will download the release |
|
61 tarball. Finally you can specify a full svn url (including the |
|
62 revision number). An example of this would be |
|
63 `http://code.djangoproject.com/svn/django/branches/newforms-admin@7833`. |
|
64 |
|
65 settings |
|
66 You can set the name of the settings file which is to be used with |
|
67 this option. This is useful if you want to have a different |
|
68 production setup from your development setup. It defaults to |
|
69 `development`. |
|
70 |
|
71 download-cache |
|
72 Set this to a folder somewhere on you system to speed up |
|
73 installation. The recipe will use this folder as a cache for a |
|
74 downloaded version of Django. |
|
75 |
|
76 extra-paths |
|
77 All paths specified here will be used to extend the default Python |
|
78 path for the `bin/*` scripts. |
|
79 |
|
80 pth-files |
|
81 Adds paths found from a site `.pth` file to the extra-paths. |
|
82 Useful for things like Pinax which maintains its own external_libs dir. |
|
83 |
|
84 control-script |
|
85 The name of the script created in the bin folder. This script is the |
|
86 equivalent of the `manage.py` Django normally creates. By default it |
|
87 uses the name of the section (the part between the `[ ]`). |
|
88 |
|
89 wsgi |
|
90 An extra script is generated in the bin folder when this is set to |
|
91 `true`. This can be used with mod_wsgi to deploy the project. The |
|
92 name of the script is `control-script.wsgi`. |
|
93 |
|
94 wsgilog |
|
95 In case the WSGI server you're using does not allow printing to stdout, |
|
96 you can set this variable to a filesystem path - all stdout/stderr data |
|
97 is redirected to the log instead of printed |
|
98 |
|
99 fcgi |
|
100 Like `wsgi` this creates an extra script within the bin folder. This |
|
101 script can be used with an FCGI deployment. |
|
102 |
|
103 test |
|
104 If you want a script in the bin folder to run all the tests for a |
|
105 specific set of apps this is the option you would use. Set this to |
|
106 the list of app labels which you want to be tested. |
|
107 |
|
108 testrunner |
|
109 This is the name of the testrunner which will be created. It |
|
110 defaults to `test`. |
|
111 |
|
112 All following options only have effect when the project specified by |
|
113 the project option has not been created already. |
|
114 |
|
115 urlconf |
|
116 You can set this to a specific url conf. It will use project.urls by |
|
117 default. |
|
118 |
|
119 secret |
|
120 The secret to use for the `settings.py`, it generates a random |
|
121 string by default. |
|
122 |
|
123 |
|
124 FCGI specific settings |
|
125 ====================== |
|
126 |
|
127 Options for FCGI can be set within a settings file (`settings.py`). The options |
|
128 is `FCGI_OPTIONS`. It should be set to a dictionary. The part below is an |
|
129 example:: |
|
130 |
|
131 FCGI_OPTIONS = { |
|
132 'method': 'threaded', |
|
133 } |
|
134 |
|
135 |
|
136 Another example |
|
137 =============== |
|
138 |
|
139 The next example shows you how to use some more of the options:: |
|
140 |
|
141 [buildout] |
|
142 parts = django extras |
|
143 eggs = |
|
144 hashlib |
|
145 |
|
146 [extras] |
|
147 recipe = iw.recipe.subversion |
|
148 urls = |
|
149 http://django-command-extensions.googlecode.com/svn/trunk/ django-command-extensions |
|
150 http://django-mptt.googlecode.com/svn/trunk/ django-mptt |
|
151 |
|
152 [django] |
|
153 recipe = djangorecipe |
|
154 version = trunk |
|
155 settings = development |
|
156 project = exampleproject |
|
157 wsgi = true |
|
158 eggs = |
|
159 ${buildout:eggs} |
|
160 test = |
|
161 someapp |
|
162 anotherapp |
|
163 |
|
164 Example using .pth files |
|
165 ======================== |
|
166 |
|
167 Pinax uses a .pth file to add a bunch of libraries to its path; we can |
|
168 specify it's directory to get the libraries it specified added to our |
|
169 path:: |
|
170 |
|
171 [buildout] |
|
172 parts = PIL |
|
173 svncode |
|
174 myproject |
|
175 |
|
176 [PIL] |
|
177 recipe = zc.recipe.egg:custom |
|
178 egg = PIL |
|
179 find-links = http://dist.repoze.org/ |
|
180 |
|
181 [svncode] |
|
182 recipe = iw.recipe.subversion |
|
183 urls = http://svn.pinaxproject.com/pinax/tags/0.5.1rc1 pinax |
|
184 |
|
185 [myproject] |
|
186 recipe = djangorecipe |
|
187 version = 1.0.2 |
|
188 eggs = PIL |
|
189 project = myproject |
|
190 settings = settings |
|
191 extra-paths = ${buildout:directory}/myproject/apps |
|
192 ${svncode:location}/pinax/apps/external_apps |
|
193 ${svncode:location}/pinax/apps/local_apps |
|
194 pth-files = ${svncode:location}/pinax/libs/external_libs |
|
195 wsgi = true |
|
196 |
|
197 Above, we use stock Pinax for pth-files and extra-paths paths for |
|
198 apps, and our own project for the path that will be found first in the |
|
199 list. Note that we expect our project to be checked out (e.g., by |
|
200 svn:external) directly under this directory in to 'myproject'. |
|
201 |
|
202 Example with a different Python version |
|
203 ======================================= |
|
204 |
|
205 To use a different Python version from the one that ran buildout in the |
|
206 generated script use something like:: |
|
207 |
|
208 [buildout] |
|
209 parts = myproject |
|
210 |
|
211 [special-python] |
|
212 executable = /some/special/python |
|
213 |
|
214 [myproject] |
|
215 recipe = djangorecipe |
|
216 version = 1.0.2 |
|
217 project = myproject |
|
218 python = special-python |
|
219 |
|
220 |
|
221 Example configuration for mod_wsgi |
|
222 ================================== |
|
223 |
|
224 If you want to deploy a project using mod_wsgi you could use this |
|
225 example as a starting point:: |
|
226 |
|
227 <Directory /path/to/buildout> |
|
228 Order deny,allow |
|
229 Allow from all |
|
230 </Directory> |
|
231 <VirtualHost 1.2.3.4:80> |
|
232 ServerName my.rocking.server |
|
233 CustomLog /var/log/apache2/my.rocking.server/access.log combined |
|
234 ErrorLog /var/log/apache2/my.rocking.server/error.log |
|
235 WSGIScriptAlias / /path/to/buildout/bin/django.wsgi |
|
236 </VirtualHost> |
|
237 |
|
238 |
|
239 Changes |
|
240 ======= |
|
241 |
|
242 0.20 |
|
243 ---- |
|
244 |
|
245 - The recipe know makes the `django` package know to setuptools during install. |
|
246 This closes #397864. Thanks to Daniel Bruce and Dan Fairs for the patch. |
|
247 |
|
248 - Fixed #451065 which fixes a problem with the WSGI log file option. |
|
249 |
|
250 - Added the posibilty to configure more FCGI related settings. Thanks to Vasily |
|
251 Sulatskov for the patch. |
|
252 |
|
253 0.19.2 |
|
254 ------ |
|
255 |
|
256 - The generated WSGI & FCGI scripts are now properly removed when |
|
257 options change (fixes #328182). Thanks to Horst Gutmann for the |
|
258 patch. |
|
259 |
|
260 - Scripts are now updated when dependencies change. This fixes #44658, |
|
261 thanks to Paul Carduner for the patch. |
|
262 |
|
263 0.19.1 |
|
264 ------ |
|
265 |
|
266 - Applied fix for the change in WSGI script generation. The previous |
|
267 release did not work properly. |
|
268 |
|
269 0.19 |
|
270 ---- |
|
271 |
|
272 - When running again with non-newest set the recipe will no longer |
|
273 update the Subversion checkout. Thanks to vinilios for the patch. |
|
274 |
|
275 - The WSGI and FCGI scripts are now generated using Buildout's own |
|
276 system. This makes them more similar to the generated manage script |
|
277 with regard to the setup of paths. Thanks to Jannis Leidel for the |
|
278 patch. |
|
279 |
|
280 0.18 |
|
281 ---- |
|
282 |
|
283 - Paths from eggs and extra-paths now get precedence over the default |
|
284 system path (fixes #370420). Thanks to Horst Gutmann for the patch. |
|
285 |
|
286 - The generated WSGI script now uses the `python` option if |
|
287 present. This fixes #361695. |
|
288 |
|
289 0.17.4 |
|
290 ------ |
|
291 |
|
292 - Fixed a problem when not running in verbose mode (fixes #375151). |
|
293 |
|
294 0.17.3 |
|
295 ------ |
|
296 |
|
297 - Removed dependency on setuptools_bzr since it does not seem to work |
|
298 like I expected. |
|
299 |
|
300 0.17.2 |
|
301 ------ |
|
302 |
|
303 - Changed the download code to use urllib2. This should make it work |
|
304 from behind proxies (fixes #362822). Thanks to pauld for the patch. |
|
305 |
|
306 0.17.1 |
|
307 ------ |
|
308 |
|
309 - Fixed a problem with the new WSGI logging option #348797. Thanks to |
|
310 Bertrand Mathieu for the patch. |
|
311 |
|
312 - Disable generation of the WSGI log if "wsgilog" isn't set, thanks to |
|
313 Jacob Kaplan-Moss for the patch. |
|
314 |
|
315 - Updated buildout.cfg and .bzrignore, thanks Jacob Kaplan-Moss. |
|
316 |
|
317 0.17 |
|
318 ---- |
|
319 |
|
320 - Added an option to specify a log file for output redirection from |
|
321 the WSGI script. Thanks to Guido Wesdorp for the patch. |
|
322 |
|
323 0.16 |
|
324 ---- |
|
325 |
|
326 - Subversion aliases are now supported (something like |
|
327 svn+mystuff://myjunk). Thanks to Remco for the patch. |
|
328 |
|
329 0.15.2 |
|
330 ------ |
|
331 |
|
332 - Update to move pth-files finder from the __init__ method to the |
|
333 install method so it runs in buildout-order, else it looks for pth |
|
334 files in dirs that may not yet exist. Thanks to Chris Shenton for |
|
335 the update to his original patch. |
|
336 |
|
337 0.15.1 |
|
338 ------ |
|
339 |
|
340 - Update to make the previously added pth-files option better |
|
341 documented. |
|
342 |
|
343 0.15 |
|
344 ---- |
|
345 |
|
346 - Added "pth-files" option to add libraries to extra-paths from |
|
347 site .pth files. Thanks to Chris Shenton for the patch. |
|
348 |
|
349 0.14 |
|
350 ---- |
|
351 |
|
352 - The recipe now supports creating a FCGI script. Thanks to Jannis |
|
353 Leidel for the patch. |
|
354 |
|
355 - When downloading a Django recipe for the first time the recipe now |
|
356 properly reports the url it is downloading from. |
|
357 |
|
358 0.13 |
|
359 ---- |
|
360 |
|
361 - Specifying a user name within a subversion url now works. The code |
|
362 that determined the revision has been updated. This fixes issue |
|
363 #274004. Thanks to Remco for the patch. |
|
364 |
|
365 - Updated the template for creating new projects. It now uses the |
|
366 current admin system when generating it's `urls.py` file. This fixes |
|
367 issue #276255. Thanks to Roland for the patch. |
|
368 |
|
369 0.12.1 |
|
370 ------ |
|
371 |
|
372 - Re-upload since CHANGES.txt was missing from the release |
|
373 |
|
374 0.12 |
|
375 ---- |
|
376 |
|
377 - The recipe no longer executes subversion to determine whether the |
|
378 versions is to be downloaded using subversion. This fixes issue |
|
379 #271145. Thanks to Kapil Thangavelu for the patch. |
|
380 |
|
381 - Changed the `pythonpath` option to `extra-paths`. This makes the |
|
382 recipe more consistent with other recipes (see issue #270908). |
|
383 |
|
384 0.11 |
|
385 ---- |
|
386 |
|
387 - Another go at fixing the updating problem (#250811) by making sure |
|
388 the update method is always called. It would not be called in the |
|
389 previous version since the recipe wrote a random secret (if it |
|
390 wasn't specified) to the options for use with a template. Buildout |
|
391 saw this as a change in options and therefore always decided to |
|
392 un-install & install. |
|
393 |
|
394 - When both projectegg and wsgi=True are specified, the generated wsgi |
|
395 file did not have the correct settings file in it. This has been |
|
396 fixed with a patch from Dan Fairs. |
|
397 |
|
398 - The recipe now has logging. All print statements have been replaced |
|
399 and a few extra logging calls have been added. This makes the recipe |
|
400 more informative about long running tasks. Thanks erny for the patch |
|
401 from issue #260628. |
|
402 |
|
403 0.10 |
|
404 ---- |
|
405 |
|
406 - The recipe no longer expects the top level directory name in a |
|
407 release tarball to be consistent with the version number. This fixes |
|
408 issue #260097. Thanks to erny for reporting this issue and |
|
409 suggesting a solution. |
|
410 |
|
411 - Revision pinns for the svn checkout now stay pinned when re-running |
|
412 the buildout. This fixes issue #250811. Thanks to Remco for |
|
413 reporting this. |
|
414 |
|
415 - Added an option to specify an egg to use as the project. This |
|
416 disables the code which creates the basic project structure. Thanks |
|
417 to Dan Fairs for the patch from issue #252647. |
|
418 |
|
419 0.9.1 |
|
420 ----- |
|
421 |
|
422 - Fixed the previous release which was broken due to a missing |
|
423 manifest file |
|
424 |
|
425 0.9 |
|
426 --- |
|
427 |
|
428 - The settings option is fixed so that it supports arbitrary depth |
|
429 settings paths (example; `conf.customer.development`). |
|
430 |
|
431 - The version argument now excepts a full svn url as well. You can use |
|
432 this to get a branch or fix any url to a specific revision with the |
|
433 standard svn @ syntax |
|
434 |
|
435 - The wsgi script is no longer made executable and readable only by |
|
436 the user who ran buildout. This avoids problems with deployment. |
|
437 |
|
438 Platform: UNKNOWN |
|
439 Classifier: Framework :: Buildout |
|
440 Classifier: Framework :: Django |
|
441 Classifier: Topic :: Software Development :: Build Tools |
|
442 Classifier: Development Status :: 5 - Production/Stable |
|
443 Classifier: License :: OSI Approved :: BSD License |