-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathINSTALL
More file actions
78 lines (49 loc) · 2.16 KB
/
INSTALL
File metadata and controls
78 lines (49 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
PlantDB
Copyright (C) 2013 Andreas Bofjäll <andreas@gazonk.org>
WHERE TO GET THE SOFTWARE
The official repository is at github:
https://github.com/andbof/plantdb
PREREQUISITES
You will need:
- Django
- Python
- Python Imaging Library (PIL)
- python-crypto
- python-reportlab
BASIC INSTALLATION
Unfortunately, django needs to create some files in the repo. Django will
refuse if the directory name already exists, and so will git. This means
you'll have to clone first, create a project, and then merge them.
Clone the plantdb git repository somewhere:
git clone git://github.com/andbof/plantdb plantdb-repo
Then start a Django project called plantdb:
django-admin.py startproject plantdb
And move everything from the cloned repo into the Django project:
cd plantdb-repo
find . -type f -exec mv '{}' ../plantdb/ \;
cd ..
rmdir plantdb-repo
CONFIGURING
The subdirectory "local" will be ignored by git. This is preferrably used to
store all local stuff, such as the SQL database if you're using sqlite, and
other files such as uploaded images.
Set up an SQL database somewhere. Django supports sqlite, which is probably
the easiest and quickest way.
Edit plantdb/plantdb/settings.py according to your own system. There's a few
settings that are plantdb-specific in there, such as what Django apps are
part of the plantdb site. They are listed in plantdb/plantdb/settings.sample.
Copy those into your settings.py.
Now initialize the database:
./manage.py syncdb
Unfortunately, you also need to edit qr/functions.py and change "YOUR_DOMAIN"
to your domain name. This needs to be fixed somehow in the future.
RUNNING A SERVER
For testing purposes ONLY, you can use Djangos built-in test server:
./manage.py runserver
For production servers, configure your favourite HTTP daemon. If you're
running Django via fastcgi, make sure you include this in your HTTP daemon
configuration:
- It should handle requests to /plantdb.fcgi
- Urls beginning with /static/ should be rewritten to drop the "static/" prefix
- All other urls should be prepended with "plantdb.fcgi"
See the Django documentation for details.