Varud

Socially Proximate Predictions

Flower

Posts Tagged ‘pinax’

Install Eclipse Galileo for Django and Pinax – Part 2

Now, onto getting Pinax installed for development purposes:

I really don’t like how things have gone with Pinax installation in the past few months. I’m going to give my own take on things. Pinax has moved to GitHub and so should you.

First, create an account at GitHub. Then, fork Pinax so you have your own copy to work with. For me, I have my development version here. If you want this repository to be private, you can pay GitHub $7/month – well worth it if this is a corporate gig.

Now you can follow the Pinax directions from your own fork.

$ curl -O http://github.com/AdamN/pinax/raw/master/scripts/pinax-boot.py
$ python pinax-boot.py --development ../Documents/workspace/WhateverYouNamedProject/src/pinax
$ source ../Documents/workspace/WhateverYouNamedProject/src/pinax/bin/activate
(pinax)$ cd ../Documents/workspace/WhateverYouNamedProject/src/pinax
(pinax)$ pip install --requirement src/pinax/requirements/external_apps.txt

At this point, if you have an existing installation of Pinax on your machine, you may get an error about django-wikiapp being the wrong version. In a new command line tab, run:

pip install django-wikiapp==0.1.2

If it says it’s already installed, you may need to delete the existing django-wikiapp in the directory shown by the error in the pip install command above. Now it’s time to start a project:

(pinax)$ pinax-admin clone_project basic_project myproject

You now have a Pinax site in myproject/ directory

(pinax)$ cd myproject
(pinax)$ ./manage.py syncdb
(pinax)$ ./manage.py runserver

Now, go to your browser and navigate to http://127.0.0.1:8000

Hopefully, you now see a Pinax website in all its glory.

Install Eclipse Galileo for Django and Pinax – Part 1

Today I decided to see if I could do a proof of concept Django/Pinax deployment for an anti-fraud advertising service. Since they already use PHP for their legacy codebase and since the existing developer uses Eclipse and the Zend Plugin for debugging, I decided to use Eclipse for the proof of concept (since I have to convince that person to switch to Django).

First things first. Update your Mac to the latest and greatest software and JVM. A new JVM literally came out today so that’s what I did.

Now, go download the bleeding edge release candidate Eclipse for Java EE Cocoa Version – Galileo. Some people will probably want something else, but I say that Cocoa apps are way nicer than Carbon ones and anyway, I went with Galileo. The Java EE version has web development tools built in there which I thought would be important. Feel free to comment below with a leaner way to do this – I’m not using Java.

Now, grab the new version of Subversion (if you’re using Subversion). I got, and highly recommend, version 1.6.2. I usually don’t get the latest SVN packages but when trying 1.4.x it did not work.

Spin up Eclipse and grab some plugins. You’ll need the PyDev and Subclipse plugins. Go to Help > Install New Software, and install these:

Get the 1.6 series of Subclipse here:

http://subclipse.tigris.org/update_1.6.x

PyDev for debugging and highlighting:

http://pydev.sourceforge.net/updates/

For Subclipse, you’ll get alot of options. Just install everything (again, I’m usually lean but I tried not installing everything and had issues – I would just do it all).

Now, run through the fantastic Getting Started guide on the PyDev website. It’s written for Windows and a previous version, but you should be able to get through everything.

When you’ve gone through that, it’s time to get your existing SVN project into the project you created for PyDev above. Just right-click on the project and select ‘Import’. From there, choose SVN and import from your svn repository (if you have one – otherwise, skip this).

I will get to Pinax on the next post, when I figure it out :-)

Events in Django

Being that I am creating a site tightly coupled with events and calendars, I need some event functionality.  There are three options:

  1. The event subsystem from Django Basic Apps
  2. Somebody’s self-maintained event app
  3. And … the event system that’s in Pinax

Option 3 really is great.  What a great app written with some really good methods including Periods and Relations.  I’m very excited to use it.

Site Hijacked

I’m not sure if anybody noticed, but the site was taken down for a few days because somebody defaced it.  I kind of liked the music that they put on my homepage, but after listening to the song, I had to go about fixing it.  What did I learn?

  1. Don’t use shared hosts.  In this day and age, unless you are super poor, do not use a shared host.  If you are not technically savvy, use services for specific tasks (i.e. blogger.com for a blog) so you don’t have to think about the technology/maintenance.  If you are technically savvy and you have needs that are not basic, get a server where you have root access.  AWS ec2 is awesome for this.  The cost is $75 a month though so it may be too expensive for some people (although if you can set one up – I can probably find a gig for you to make enough money to pay that $75/month – just drop me a line).
  2. Dreamhost.com, while pretty good and having good customer service, just isn’t what I need.  People have recommended gandi.net for name services and hosting if you need the cheap option for hosting.  I haven’t used it personally but knowledgeable people love them.

Oh, I don’t think I’ve done an update on platform choices either.  Here is where I stand now:

  1. MySQL 5.0.45 (I’m still contemplating PostgreSQL)
  2. Python 2.5.1
  3. Apache 2.2.9
  4. Fedora 8 (I like the Fedora/Red Hat series – Debian/Ubuntu was giving me grief).
  5. Django 1.0
  6. Pinax trunk

That was fun!  I feel very excited about the Python community.  It’s a smaller group but it’s growing fast and it has solid support out there.  In addition, it’s a rock solid language with full unicode support – I love that.