Welcome!

I’m assuming that you are relatively new to Python and django; and that you have them installed.  I will try to make the material of this tutorial as simple as possible.

Note, if you can’t see the instructions below, please click the title of this post.  I’ll get this fixed when I get a chance.

(more…)

 

ColtonProvias.com Updated

On October 25, 2009, in Other, by Colton Provias
0

I have finally started into updating my blog.  First, you may notice that the theme for the blog has been altered.  I started getting bored with the previous theme, so I decided to try something new.

Secondly, I have gone and started updating the pages on the blog.  So far, About Me and Projects -> Nerds: The Musical are done.

Finally, I will be redoing the categories and tags on all of the posts on this blog over the next week to make it a little more organized.  Thus expect the right sidebar’s content to change somewhat over this next week.

On a side note: The Dvorak Simplified Layout is a great thing that also happens to be a pain.  It feels nice to use, but it is taking a while to get used to it.

 

The Entr’acte

On October 25, 2009, in Other, by Colton Provias
1

Alongside zymio, I am also working on my musical.  Today, I have decided to share with you another sample from it: the Entr’acte/Act 2 Opening.

Entr’acte/Act 2 Opening

Meanwhile, if you enjoy my music, consider becoming a fan of me on my Facebook Musician Page.

 

zymio is back at 50%

On October 25, 2009, in Other, by Colton Provias
0

zymio is now back at 50% and is progressing.  Right now the current task on zymio is to completely recode the accounts application to clean things up.  Meanwhile, several items related to zymio (and django development in general) are caching, monetary support, and IDEs.

First off, caching is an issue for zymio.  This is a website where each time a page is displayed, most of it will have to change.  Thus, caching on a per-view basis is useless.  Over the next couple of weeks, I will be looking into caching on a per-view, per-user basis to see if there is any way to improve the speed of the site.

zymio, upon opening, will cost about $300 in the first year at minimum.  If the site takes off rapidly, then the cost will quickly rocket up to $3,000/yr. and continue climbing as more members join.  In order to support this, I will have to try to find a way to support the site.  I honestly want to avoid ads as they detract from the experience for the users (and many users use Ad-Block, so there isn’t much point anymore).  I’ll go into this topic more in-depth in the near future.

For a while, I’ve been developing using Text Wrangler.  It has worked well, but it seemed lacking some features such as autocomplete.  Instead, I now use Komodo IDE instead.  So far, it seems to suit me much better than TextWrangler.  However, it took just a little bit of configuration to get it to include the django libraries and to also include zymio for any autocomplete or tooltip functionality.

Finally, expect a screenshot in the next post on zymio.

 

A New Musical

On October 17, 2009, in Other, by Colton Provias
0

I apologize for the delay in posts, but I have yet another project in the works!  I have started work on writing a musical.  It was kind of a spur of the moment idea that is actually picking up speed and growing quickly.  Here is a sample song from the show (Overture, first song, and first song play-off):

http://coltonprovias.com/kinetic-musical-2.mp3

 

zymio: Photos Application

On October 7, 2009, in Other, by Colton Provias
0

zymio is still being developed, albeit rather slowly.  However, one application I will be actively working on is the photos application.  The complexity of this single application will hopefully set zymio apart from other services.  Now the question is if it will work.

There, another post.  I still haven’t fallen asleep, so it is still Tuesday to me.

 

The LION, A Place to Practice, and Other Things

On October 5, 2009, in Other, by Colton Provias
0

Okay, I’ve been neglecting my blog once again (I should really stop doing that), but it’s time to start back into it.

First off, I have been spending a good chunk of my time down at The LION 90.7fm studio at the HUB here at Penn State.  Needless to say, I’m a techie again!  Right now, I do numerous tasks down there such as board operation for Penn State Nittany Lion Football games and am a regular panelist on Radio Free Penn State.  You can find The LION 90.7fm’s website at thelion.fm.  You can even listen to the station from the website via the built in flash player on the front page of the site.

Meanwhile, I’ve been missing playing the saxophone for a while.  However, I recently discovered that in the depths of Fisher Hall, there is a game room with a piano in it.  I checked it out and the room seems to keep sound in rather well, but the reverberation is quite horrible.  However, it still works and probably a few times a week now I will go down to that room for an hour to practice the tenor saxophone.

On another note, Calculus mid terms aren’t that hard.  Now the question remains as to if I bombed the test or not.

Finally, zymio is once again in active development.  A few modules are now ready for launch.  However, a good bit of work remains.  The current aim is for the end of October.

I hope to start into posting everyday from this point on.  Let’s see how well I do this time.

 

Another Work in Progress

On September 24, 2009, in Other, by Colton Provias
0

I sat down about a week ago and quickly wrote out a piece over the duration of 2 hours and numerous crashes (Snow Leopard isn’t all that stable, apparently).  The piece is untitled at the current stage:

Untitled Piece 5

 

Django on DreamHost with Passenger

On September 21, 2009, in Django/Python, by Colton Provias
11

Django has always been slow for me on Dreamhost thanks to FastCGI but not anymore.  As of yesterday, I am using Passenger WSGI to launch my django applications and a significant performance increase is easily noted.  For those wanting to use Passenger, here are some simple instrutions:

Warning: Passenger WSGI support is still just proof of concept.  It can break, so be careful.  I have not had any problems yet.

Setting up the account and domain

Before we start installing anything, go into your DreamHost control panel and select the domain you want to install django on (or make a new one).  You have to change the directory from domain to domain/public as this will serve as a base for static files.  Then scroll down a little bit and enable Passenger.

Next, go to your manage users screen and select the user for the domain.  Change the user from an FTP user to a Shell user if you haven’t done so already.

Finally, give DreamHost a few minutes to update their servers and then connect via ssh.  For Mac and Linux users, open a terminal and type:

ssh domain -l username

If you are on Windows, Google the Netspace SSH client or just use PuTTY.  Type in your password and get ready for some shell-based work.  First let’s alter the environment:

echo 'PATH="$HOME/bin:$PATH"' >> ~/.bash_profile
echo 'LD_LIBRARY_PATH=$HOME/lib/' >> ~/.bash_profile
source ~/.bash_profile

This will alter your .bash_profile file so your home directory becomes part of your path.

Installing Python

Now, for an easy part, it’s time to download and install Python 2.6.2

wget http://python.org/ftp/python/2.6.2/Python-2.6.2.tgz
tar -xzvf Python-2.6.2.tgz
cd Python-2.6.2
./configure --prefix=${HOME}
make
make install
cd ~
rm -rf Python-2.6.2
rm Python-2.6.2.tgz

Not that bad.  Just a few more installations left.

Installing SWIG

wget http://voxel.dl.sourceforge.net/sourceforge/swig/swig-1.3.40.tar.gz
tar -xvzf swig-1.3.40.tar.gz
cd swig-1.3.40
./configure --prefix=${HOME}
make
make check
make install
cd ~
rm -rf swig-1.3.40
rm swig-1.3.40.tar.gz

Installing setuptools

Now for a useful script, setuptools.  It will help us out really soon.

wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
rm ez_setup.py

Installing MySQLdb

I’m assuming that you will be using MySQL as a database backend.  This will install the library needed for MySQL.

wget http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3b1.tar.gz
tar -xvzf MySQL-python-1.2.3b1.tar.gz
cd MySQL-python-1.2.3b1.tar.gz
python setup.py install
cd ~
rm -rf MySQL-python-1.2.3b1
rm MySQL-python-1.2.3b1.tar.gz

PIL (Python Imaging Library)

If you want to use any ImageField fields in your database or want to work with images, you have to have this or django will fail when syncing the database.

easy_install --find-links http://www.pythonware.com/products/pil/ Imaging

Setting up django

cd ~/domain
rm -rfv ./*
mkdir public
svn co http://code.djangoproject.com/svn/django/trunk/ django_src
easy_install django_src
rm -rf django_src
svn co http://code.djangoproject.com/svn/django/trunk/django
mkdir public/media
ln -s ~/domain/django/contrib/admin/media ~/domain/public/media/admin
django-admin.py startproject project
echo 'import sys, os' > passenger_wsgi.py
echo 'INTERP = "/home/username/bin/python"' >> passenger_wsgi.py
echo 'if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)' >> passenger_wsgi.py
echo 'sys.path.append("/home/username/domain")' >> passenger_wsgi.py
echo 'os.environ["DJANGO_SETTINGS_MODULE"] = "project.settings"' >> passenger_wsgi.py
echo 'import django.core.handlers.wsgi' >> passenger_wsgi.py
echo 'application = django.core.handlers.wsgi.WSGIHandler()' >> passenger_wsgi.py
pkill python

Now visit domain in your webbrowser and you should see a page generated by django. Your media root is /home/username/domain/public/media/ and your media url is http://domain/media/.

 

Mac OS X Snow Leopard and Python

On September 15, 2009, in Other, by Colton Provias
0

For those running django on Mac OS X Snow Leopard after performing the upgrade, you may have had a little bit of trouble. Apparently, Snow Leopard does not use the latest version of Python, so it is best to go to python.org to download and install the latest version.  You may then want to make sure that it works and, if not, reinstall django and any plug-ins for django to the correct site-packages directory.