Installing Django on Ubuntu 10.04 LTS

check your hostname is set properly:

>hostname -f

update the server:

apt-get update
>apt-get upgrade

install apache and mod_wsgi:

>sudo apt-get install apache2 libapache2-mod-wsgi

and install setup tools for python, and pip:

> sudo apt-get install python-setuptools
> sudo apt-get install python-pip

Pick a database:

>apt-get install mysql-server python-mysqldb
>apt-get install postgresql python-psycopg2
>apt-get install sqlite3 python-sqlite

Now install Django:

> sudo pip install django

and prepare the folders you will need :

> sudo mkdir /srv/www
> sudo mkdir /srv/www/wsgi
> sudo mkdir /srv/www/public_html

create a file to test if wsgi working:
sudo vim /srv/www/wsgi/app.wsgi

putting this content into the app.wsgi file:
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'

response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)

return [output]

create a new apache site to test wsgi:
sudo vim /etc/apache2/sites-available/wsgi

and add this content to the site, replacing “myDocRootUrl” as appropriate — NOTE: bug in my blog software, so left out the opening less than sign on the virtual host tags:
VirtualHost *:80>

ServerName myDocRootUrl.wsgi
DocumentRoot /srv/www/wsgi

Order allow,deny
Allow from all

WSGIScriptAlias / /srv/www/wsgi/app.wsgi


Next, check for and remove any default sites in sites-enabled folder:

>ls /etc/apache2/sites-available
>rm whatever defaults in there...

Now activate the test of wsgi site:
> sudo a2ensite wsgi
> sudo /etc/init.d/apache2 reload

Now visit the url you specified as myDocRootUrl.wsgi and you should see “Hello World!”

If not, first thing, check your apache error log (you likely need to change to root user here, not just sudo):

>sudo su -
>cat /var/log/apache2/error.log

Create django project:

> cd /srv/www
> sudo startproject myProject

Your project folder should now contain these files:

Create a wsgi file for the project (rename myProject as appropriate):

> sudo mkdir /srv/www/myProject/apache
> sudo vim /srv/www/myProject/apache/django.wsgi

and put this text in that django.wsgi file (rename myProject as appropriate):
import os
import sys

path = '/srv/www'
if path not in sys.path:
sys.path.insert(0, '/srv/www')

os.environ['DJANGO_SETTINGS_MODULE'] = 'myProject.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Create a new apache sites-available for your django project:

>sudo vim /etc/apache2/sites-available/myProject

and add starter virtual host content to it (rename myProject as appropriate)(virtual hosts tags missing leading <):

VirtualHost *:80>

ServerName myDocRootUrl.myProject
DocumentRoot /srv/www/myProject

Order allow,deny
Allow from all

WSGIDaemonProcess myDocRootUrl.myProject processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup myDocRootUrl.myProject

WSGIScriptAlias / /srv/www/myProject/apache/django.wsgi


Activate the new project site:
> sudo a2ensite myProject
> sudo /etc/init.d/apache2 reload

browse to your project url and hopefully you see the default django welcome message!

Mostly this article came from below, but I added to it:

Typical github steps moving in a new repository

Global setup:
Set up git
git config --global "Dave Parizek"
git config --global

Next steps:
mkdir UAC
cd UAC
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin
git push -u origin master

Existing Git Repo?
cd existing_git_repo
git remote add origin
git push -u origin master

Restarting Apache, different ways

Just reference for restarting apache, different strokes for different servers:

# /etc/init.d/httpd restart
# /etc/init.d/httpd start
# /etc/init.d/httpd stop

# service httpd restart

# apachectl -k graceful

sometimes you need sudo because it might only see the path from root


Oops, deleted super user Drupal 6, what to do? maybe you emptied user table?

I left my thinking cap off and emptied the user table of a dev Drupal 6 site I was working on. If that happens to you, just access your database with phpMyAdmin or similar, and:

INSERT INTO users (uid, name, pass) VALUES ('1', 'yourname', md5('yourpassword'));

then edit the users table further to add your email address and set status = 1.

Drupal 6 Programmatically Create Users

How to programmatically create new users in Drupal 6:

'pass' => 'password', // note: do not md5 the password
'mail' => 'email address',
'status' => 1,
'init' => 'email address'
user_save(null, $newUser);

To update an existing user:

some_property = 'what_you_want_to_set_it_to';

// save existing user
user_save((object) array('uid' => $existingUser->uid), (array) $existingUser);

List of Citizen Science applications / web sites / mobile phone applications

Hello. I am trying to compile a list of web sites and mobile phone applications wherein people are using technology to enable citizen science. If you know of a project I do not have listed, can you add it via the comments, and I will add it to the list? Thanks!







eBird and Cornell seem most successful, check out these quick facts: More than 60 scientific papers have used Cornell Lab citizen-science data since 1997
97,331 checklists reported from the four-day Great Backyard Bird Count in 2010
More than 96,000 nesting attempts reported to the Cornell Lab since 1997
1,000,000 bird observations reported to eBird on average each month
More than 80,000,000 bird observations in the Avian Knowledge Network


Cornell cit sci page




Project Noah


Leaf Snap


What's Invasive


Google's Open Data Kit


mapping of sudden oak death


will be adding android, iphone apps, and probably expanding to


at Project Noah

there are other projects linked to from project noah site – ladybugs, many many more, some lame, some real good



National Phenology Network



Cornell is involved in multiple apps, with iphone stuff too, having trouble finding all my links -Dave See


Tucson Bird Count




California Roadkill iphone app


New York, iphone app, horseshoe crabs


multiple projects Cornell Ornithology

multiple citizen science projects listed here, all related to ornithology


Vermont Herp Atlas



Dave is developing the backend / data entry and presentation part of this site.


iPhone apps for citizen science


gulf oil / oil spills cit sci apps


IBM's Creek Watch


interesting article cit sci iphone


has an iphone app coming, built one for RedwoodWatch


plants, leaves


planetary science and cit sci




Discovery's SciSpy


The Great Yew Tree Hunt


EpiCollect provides a web application for the generation of forms and freely hosted project websites (using Google's AppEngine) for many kinds of mobile data collection projects.
Data can be collected using multiple mobile phones running either the Android Operating system or the iPhone (using the EpiCollect mobile app) and all data can be synchronised from the phones and viewed centrally (using Google Maps) via the Project website or directly on the phones.


connected to EpiCollect


The Gila Monster Project

to be intergrated into – a new site for citizen science in Herpetology

Working with Phil Rosen, Kevin Bonine, Julia Fonseca, and Brian Powell, I have in my free time developed a cool site for citizen herpetologists. It enables citizen scientists to contribute observational data on herps of southern Arizona. In the next few months, we hope to add iPhone and Android applications to it, and to make many improvements to the site. We also want to expand its scope both geographically and taxonomically.

Check it out –

We have even gotten some press on it already, for example, here: article on HerpCount.