-
Setup python virtualenv via
sudo pip install virtualenv
. -
In a project directory, type virtualenv env to create a python virtual environment.
-
(optional) install virtualenv_cd_alias via
git clone https://github.com/patrick-dowell/shell_stuff.git
-
Install MySQL if you don't have it from http://www.mysql.com/downloads/mysql/.
-
Download MySQL-python from http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.2/MySQL-python-1.2.2.tar.gz/download.
-
Once inside your virtualenv, move MySQL-python to your virtualenv by typing
mv ~/Downloads/MySQL-python-1.2.2.tar.gz ./
. -
Run
tar xvfz MySQL-python-1.2.2.tar.gz
. -
Run
cd MySQL-python-1.2.2
. -
Run
vi setup_posix.py
. -
Type
:s/"mysql_config"/"\/usr\/local\/mysql-5.5.25-osx10.6-x86_64\/bin\/mysql_config"/g
and hit enter to replace"mysql_config"
with"/usr/local/mysql-5.5.25-osx10.6-x86_64/bin/mysql_config"
. (Note that the path/usr/local/mysql-5.5.25-osx10.6-x86_64/bin/mysql_config
should exist and be valid on your machine before performing this step.) -
Type
:x
and hit enter to save and quit. -
Edit
_mysql.c
lines 37, 38, and 39 as follows://#ifndef uint //#define uint unsigned int //#endif
-
Run
sudo python setup.py build
. -
Run
sudo python setup.py install
. -
Return to your python virtual environment and install Django via
pip install django
. -
Also install jinja2 via
pip install Jinja2
. -
Verify your installation by typing
python
and executing the following:>>>import MySQLdb >>>MySQLdb.apilevel '2.0' >>>import django >>>print django.VERSION (1, 4, 0, 'final', 0) >>>exit()
-
Next, create a database called
myfeed
using Sequel Pro (http://www.sequelpro.com/download/). Make sure your mysql server is running at this point. -
Config git via https://help.github.com/articles/set-up-git.
-
Now, run
git clone https://github.com/patrick-dowell/my-daily-feed.git
. -
run
python manage.py syncdb
in my_daily_feed/mysite to sync the myfeed database. -
run
python manage.py runserver
to start the server.