-
Notifications
You must be signed in to change notification settings - Fork 1
Installation Guide
*** This document hasn't been updated for years. It may not work. ***
The Virtual Planner needs version 1.0.4 of Django. This can be downloaded from the Django site here: http://www.djangoproject.com/download/1.0.4/tarball/ - for documentation detailing how to install Django, please see their guide here: http://docs.djangoproject.com/en/dev/intro/install/
Alternatively, if you're using Linux, your distribution may have it available in the repositories.
If using Ubuntu, please note that the latest version available through the repositories (at the time of writing) is "1.0-1ubunut1", which is too old.
If you're using Debian Etch, try: (this relies on you using http://www.backports.org) {{{ apt-get install -t etch-backports python-django }}}
In the following example, you can replace '''/var/www/planner/''' with any directory of your choosing.
mkdir /var/www/planner
cd /var/www/planner/
git clone git://github.com/DavidGoodwin/virtual-planning-board.git
or view the code directly on github: http://github.com/DavidGoodwin/virtual-planning-board
You should only need to edit one file: "settings.py", which is in the root of the repository. The lines you should edit are:
- 9: Change the name and email address.
- 14-19: These should reflect your database setup.
- 26 and 30: You don't /need/ to change these, but you can if you want.
- 46: This is where the data files live. It will be something like "http://www.yourserver.com/planner/static/".
- 49: The path to Trac.
- 57: In the final version, this will need changing to something unique. It can be left as-is for now.
We use:
<Location "/planner">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE planner.settings
PythonOption django.root /planner
PythonDebug On
PythonPath "['/var/www/planner', '/usr/local/apps/python/python-2.5.2/lib/python2.5/site-packages'] + sys.path"
</Location>
# these map the django static stuff and our custom static stuff to Apache (so they don't go through Django/mod_python)
# if you change these, you'll need to edit the settings.py file to make them match.
Alias /planner/static /var/www/planner/static
Alias /planner/admin/media /usr/share/python-support/python-django/django/contrib/admin/media
<Location "/planner/static">
SetHandler None
</Location>
<Location "/planner/admin/media">
SetHandler None
</Location>
(Taken from http://docs.djangoproject.com/en/dev/howto/deployment/modpython )
You should just need to create an empty database on a MySQL or PostgreSQL server and Django should do the rest. Once you've set up the '''settings.py''' file to point to the right database, run these commands:
cd /var/www/planner/
python manage.py syncdb
This will ask you to create an admin user.
Please note that the admin user cannot be used as a Virtual Planner user._
For this reason, it is advisable to give the admin user a name such as "admin" - or any other such name which will not clash with the name of a Virtual Planner user. The name of the admin user can be changed at a later date, so it is not vitally important - but it will save you from running in to some problems later on.
*** Important: The process of setting up weeks is currently broken! But here's how you do it when it is working. This will eventually be fixed.***
To set up the weeks, you need to log in to the "admin" section of the site. If, for example, your Django Virtual Planner is located at "http://www.yourserver.com/planner/board/", simply replace the last "board" with "admin" to get this URL: "http://www.yourserver.com/planner/admin/". That will ask you for a user name and password; you need to enter the admin "super user" details you chose when installing the project.
Once logged in, you will see various links down the left side of the page. Click on the "Weeks" link in the "Board" section. If no weeks are shown, visit this link in your browser: "http://www.yourserver.com/planner/board/cron/" - this will populate the database with a few weeks (this page will be explained fully in the forthcoming documentation). Refreshing the "Weeks" page in the admin section should now show six weeks.
Go back to the main admin page (click "Home" at the top-left of the page), then choose the "Persons" link from the "Board" section. If there are no users listed, click the "Add person" button at the top-right of the page. Give them a user name and password, then you will be taken to a page where you can fill out the rest of their details.
There's a lot of stuff on this page, but you can ignore most of it. Look for the section called "Personal info" - it should be the second section from the top. At the bottom of this section should be a text-input box called "Default hours per day"; this is the important field which needs to be filled. For testing purposes, you can leave it set to 0.0 hours.
Again, go back to the main page (click "Home"), then return to the "Weeks" page. Click on a week, then look for the "View this weeks details" text below the date-entry box. Click the word "details" and you will be taken to another page.
(This step doesn't yet work!) The first link of this new page will say "Assign Someone else to this Week". Click this and you should be taken to a new page where you can assign the user you created above to this week. You can also use the second link ("(re)Populate Week (with all people and their default hours)"), which does what it says. By default, when running the "cron" script mentioned a few paragraphs previous, it will automatically add all users to newly created weeks.
For now, you can make the changes in the database. If you want to try that, let me know and I'll explain how. Basically, you just need to add records to the "board_weekdaypersonhours". Not a fun task...
It's not an easy or intuitive process, I know - it is one this we are going to fix before the release. In the final version, the task /will/ be much more simple.
An important component of the Virtual Planner is the Trac plug-in, which sends data over to the Virtual Planner keeping it up to date. For a much more technical look at the notification plug-in, please visit the NotifyPlugin page (please note that, at the time of writing, that page is a little out of date - but the information there holds true; it just sends more data now). Unlike the previous version, this has been moved to a separate repository. To get a copy of the plug-in's code, download the contents of this Github repository:
git clone git://github.com/DavidGoodwin/trac-notify-plugin.git
or view the code directly on github: http://github.com/DavidGoodwin/trac-notify-plugin
You will also need to install the "Timing and Estimation" plug-in for Trac, which can be found here: http://trac-hacks.org/wiki/TimingAndEstimationPlugin - Please note that we do not maintain the "Timing and Estimation" plug-in.
Once you have the code, change in to the newly created directory trac-python-plugin. There are two ways you can continue from this point: a) editing and building the plug-in by hand (''hard''), or 2) using the nice script to help you (''easy''). For method a), see the NotifyPlugin page. For 2), continue reading.
The script that configures and builds the plug-in for you will ask three questions. It will want to know:
- The full address of the "notification target". If your "board" page is accessible via, for example, "http://yourserver.com/planner/board/", the "notification target" would be "http://yourserver.com/planner/board/ping/". It is basically the address to your board with "ping/" on the end.
- User name to access to aforementioned notification target. It is assumed that you will be protecting the "ping/" page with Apache's HTTP authentication.
- Password which goes with the above user name. '''WARNING:''' Your password will '''not''' be masked!
Another point worth mentioning is that once the plug-in has been build, the script will try to install it to ''/usr/share/trac/plugins/''. If you do not have write permission to this directory, this step will fail. You can of course copy the file to this directory by hand at a later date, so it's not a major problem. If you do not want the plug-in to be installed into this directory (if, for instance, that's not where Trac lives on your system, or you only want it installed for one instance of Trac), please edit the ''build.sh'' file in this directory and comment out the last line (which should look like: "''cp dist/*.egg /usr/share/trac/plugins''").
Next, run the ''configure.py'' script and follow the on-screen prompts. Here's an example of what it should look like: (the middle part has been omitted since it's quite long)
sam@mort:~/trac-python-plugin$ ./configure.py
Please note that if you want this plug-in to be automagically installed in to Trac's directory, you *must* have write permission to that directory (typically '/usr/share/trac/plugins/'). If you do not, the final part of the build process will fail. See the documentation for more info.
Please input the address of the 'notification target': http://snakes.onaserver.org/planner/ping/
Please enter the user name to acces the notification target: planningboard
Please enter the password to acces the notification target: xxxxxxxxx
Plug-in configured, building the egg...
+ set -e
+ rm -Rf build
+ rm -Rf dist
+ python setup.py bdist_egg
running bdist_egg
running egg_info
creating TracNotify.egg-info
writing TracNotify.egg-info/PKG-INFO
...<snip />...
creating dist
creating 'dist/TracNotify-0.2-py2.5.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
+ cp dist/TracNotify-0.2-py2.5.egg /usr/share/trac/plugins
All done (unless you saw errors from the build process). You can now feed the plug-in's egg to Trac.
Edit (or create) '''/usr/share/trac/conf/trac.ini''' (the path will be different if you've installed Trac to somewhere else), it should look like (or at least contain):
[components]
notify.* = enabled
timingandestimationplugin.* = enabled
You will probably need to edit your Trac repository's conf/trac.ini script (e.g. at /var/trac/<project name>/conf/trac.ini) to contain:
[inherit]
file = /usr/share/trac/trac.ini