Yesterday Hugh, Dan, and I spent about an hour setting up Python, Django, the directory and everything it needed. I then realized how complicated this process really is, and how many things needed to get put together to make it all work. Mysql was one of the hardest things to get to work for most people I have talked to, and I really wanted to simplify it. Anyway I found that sqlite is very simple and really just enough for what we need for testing this stuff out. Long story short, I packaged everything you need in one zip file. Just extract, run install, and you should have the directory running on your computer in no time (assuming you have windows).
What this package includes:
Python 2.5
Django 0.96
Python Image Library
pysqlite
sqliteadmin
a snapshot of the source from 3/2/07 with a preconfigured settings.py file, templates with windows style line breaks, a small template bug fix, and database entries for all of the branches and divisions. There is also a superuser account with username: admin and password: admin.
Here's how to install it:
Making Your First Edit
I recommend starting with the HTML templates if you don't know where to dig in. The template files describe what a page on the directory website looks like. I personally prefer the 'w' in 'welcome' to be capitalized, so let's change that as an example.
<p>welcome to the</p>
<h1>People of Praise Online</h1> <p>Welcome to the</p>
<h1>People of Praise Online</h1>Also check out http://www.djangoproject.com/documentation/. That's where most people have learned how to use Django.
Re: Project Install test
Just got a new laptop and tried this install, but it was not quite as smooth as the instructions indicate.
I opened the zip, but the default file path for a zip extract is emmaus/.., so I just assigned it to c:/emmaus/
Then, in order to kick-off the automated installation, I had to double click the install.bat MS-DOS batch file to install everything.
Just out of curiosity, is there a benefit to using pysqllite vs mysql + mysqldb for python? I don't have everything quite setup for mysqlite, but before I proceed, I'm just curious if there are benefits to using one over the other.
Hugh
sqlite vs. mysql
I've never used SQLlite, so this could be completely irrelevant, but I know what I've heard about it, and my experience of MySQL:
MySQL is a powerful server application, it tends to get installed system-wide on a machine, and has a specific port that it tries to use on a machine. It has sophisticated ACL (access control list) capabilities, it's meant for a multi-user (multi-developer) environment. So.. some install packages can really simplify the process, but it's still way more than you need if you are developing an application that only you are accessing during that development, which is the case the way we work on Emmaus Project. There is a multi-user product, but we individually work on our own instances that we only individually access.
SQLlite (i don't even know the right way to spell it..) is a pure SQL environment for database storage, without any of the server/multi-user bells and whistles. In your settings.py, you just point it at a file, and everything is fine and dandy from there. No user/permission/network management of the SQL server.
One side-note/question for others about SQLlite... is there a way to connect to SQLlite databases for maintenance (i.e., alter tables) if you ever change one of your models, without invoking a full reset?
(Enjoy the new laptop Hugh! :) Ever since starting @ One:Ten, I've been able to get back into using Linux at the workstation level... it's a fun challenge. I was using Mac OS X previously.)
sqlite
I tried to make the installation work no matter where you extract the files, but it looks like it had a bug. It should install smoothly now.
The reason I chose sqlite over mysql was because it is a ton easier to install and configure. I was thinking about all of the things I would need to do to automate installing mysql and creating a username, password, and database, and this makes it a ton easier. I would not use sqlite in a live website, but this simplifies things for development. I actually had not used sqlite before sunday and I was a little worried that there was no easy way to edit the database directly, but today I found a program that can do it. http://sqliteadmin.orbmu2k.de/
Collin