Django: first impressions

Posted by Jessica Sat, 13 Feb 2010 13:09:00 GMT

A month or so ago I was anticipating a move into Django. I started on some of the Hello World tutorials on the django site, and I wanted to share the few observations from my very brief encounter with Python via Django.

  1. Double underscores?!! Whose idea was that? Does that end up being a pain when writing in Django? I remember that Ruby uses the double underscore too, but Rails doesn’t use this construct frequently from what I remember. Please someone write in and tell me I am mistaken about the frequency in use of double underscores in Django.
  2. The setup with sqlite was straight forward and simple—more simple than in Rails. It has been my impression, however, that this ease (or lack of ease) has more to do with the database installation on the operating system, than it does with actual integration with the framework. In other words, the problems that I have encountered with setting up database connections in other frameworks occur while trying to setup the data source itself.
  3. Is the settings.py file supposed to be like the web.xml in j2ee and the environment.rb in Rails? It seems that database information goes in this file, which is different than in j2ee and Rails where you have separate files to specify the database connections (e.g. context.xml and database.yml).

Overall, I would be interested in working more with Django.

  506  tar xzvf Django-1.1.1.tar.gz
  507  cd Django-1.1.1/
  508  sudo python setup.py install
  509  python
  510  ls -al
  511  vi INSTALL 
  513  django-admin.py startproject Test
  514  cd Test/
  515  ls -al
  516  python manage.py runserver
  517  python manage.py syncdb
  518  python manage.py startapp polls
  519  cd polls
  520  python manage.py sql polls
  521  cd ..
  522  python manage.py sql polls
  523  python manage.py syncdb

Google App Engine

Posted by Jessica Fri, 02 Jan 2009 06:04:00 GMT

I don’t do python… yet, at least. :) Settle down; I’ve got it on my to-do list.

But wanting to see what Google App Engine was all about, I downloaded the sdk and signed up for an account.

In the app.yaml file—where you can specify the version of the application and other meta information about your application, I noticed that a runtime can also be specified and by default it is set to python. The documentation for Google App Engine notes that…

This code runs in the python runtime environment, version “1”. Additional runtime environments and languages may be supported in the future.

So, for those of you who don’t do python either… there’s hope. Or you could do something quiet strange, like this! Yikes!

Another interesting tidbit is that some subset of Django is included with Google App Engine. Let’s play.


designed by jowensbysandifer