July 29, 2005
Check out our new model examples page. Each example there features one or more models, with example API usage.
This is intended to be a repository of common cases -- how to use many-to-one relationships, many-to-many relationships, etc. We'll be updating this frequently with more examples.
The coolest thing here: This documentation is automatically introspected from our brand-new model unit tests. To run the tests, run "runtests.py" in the "tests" directory of the Django distribution.
July 24, 2005
I've added a few more guides to Django's documentation:
- The form processing guide explains how to use Django's formfields and manipulator APIs to easily deal with form processing and validation.
- The guide to generic views explains how to take the repetition out of writing view code; Django has a set of generic views for doing date-based archives, list/detail pages, and create/update/delete operations.
July 21, 2005
I've just checked in initial support for using Django on top of the SQLite 3 database (it's in revision 288). While it's been tested a little bit, there are possibly still bugs, so please file a ticket if you find any rough edges.
This change should make it very simple to get up and running with Django quickly; no need to set up a database, muck with permissions, or what have you.
It's easy to use: in your settings file just set
sqlite3 and set
DATABASE_NAME to the full path to the database file; the rest of the database settings are ignored by the SQLite backend. You'll need to have SQLite 3 and pysqlite2 installed.
July 20, 2005
Seen our project timeline lately? It's irrefutable proof we've been constantly tweaking and improving Django. Some changes, as of late:
- The built-in development server now auto-reloads code when you refresh pages. No more having to restart the server when you make changes to your Python code! Special thanks to Jason Huggins for the patch.
meta.Admin.fieldsis now optional. By default, it'll use all editable fields in your model. Of course, you can still override it if you want fine-grained control over how your dynamically-generated admin forms look.
- We've added explicit mod_python documentation.
- We've added
django-admin.py createsuperuseras a helpful utility.
- We've made all sorts of tweaks and improvements to error messages, to make things as friendly and helpful as possible. (Speaking of friendly and helpful, have you been to the #django IRC channel yet?)
All of these improvements came within the last 48 hours. Most of them came today.
These changes are backward-compatible -- but please keep in mind that there's no guarantee of backwards compatibility until our first official release. Now's the time to suggest non-backwards-compatible changes, before we go into backwards-compatibility mode. Make suggestions on the django-developers mailing list.
Stay tuned, and get involved: Much more improvements and tweaks are on the way.
July 19, 2005
We've made available the full Django source code and templates that power this site. Just browse to the appropriate place in our code repository and explore.
This site in particular makes much use of "generic" views, which haven't been documented yet -- but will be, soon. They're a way of creating a site without needing to writing any Python view code: All you do is create your URLconf and templates.
July 19, 2005
The round of official tutorials continues, with part 3 focusing on writing public views.
Read it, and let us know in the comments how it can be improved. Of course, more is on the way.
July 18, 2005
We've gotten a lot of feedback from developers who want to explore Django but don't want to go through the hassle of installing mod_python.
OK, we've got that covered.
Just "svn update" your code, and run the command
django-admin.py runserver. That'll start a lightweight Web server running on your local machine, so you can jump right in and play.
I've updated part 2 of the tutorial to use this new method, instead of mod_python. Of course, note that this new Web server should be used only for development purposes.
On a broader note, Django is now compliant with the WSGI spec. That means it should be able to run on any WSGI-friendly server -- lighttpd, FCGI, SCGI, etc.
And that's where you come in. Prefer a particular server over Apache/mod_python? Get Django working on it, and, when you do, file a ticket telling us how you did it. We'll update this site to add your instructions.
The WSGI handler is in django/core/handlers/wsgi.py
July 17, 2005
I've finished part 2 of the official Django tutorial. It covers one of Django's sexier features: The automatic creation of admin interfaces for your data.
Even if you're just peripherally interested in how Django works, give this a skim. It has quite a few screenshots that illustrate what Django admin-generation is all about.
Read it, and let us know in the comments, or IRC channel, how it can be improved. Of course, more is on the way.
July 16, 2005
What a day. Word got out about Django, even though we haven't officially launched, and that gave us more attention than we were ready for.
At any rate, we spent all day (and night) continuing to prepare things, answering feedback in #django on freenode.net -- and writing our first official Django tutorial. It covers basic Django setup, creation of models and the database API.
July 15, 2005
I gave a sneak-preview presentation of Django at the Chicago Python Users Group meeting Thursday night, and people's reactions were astonishingly cool.
As fellow Chipy member Chris McAvoy writes: "There were actual oohs and ahhs from the group during the presentation."
Jason Huggins of Thoughtworks also enjoyed the presentation and is getting excited about using the framework.
People were saying things like, "Man, I don't even do Web development, but I want to do a project so I can use Django."
Although we're not officially launched yet -- look for that later today -- the pre-launch press is excellent. Stay tuned. And subscribe to this weblog's RSS feed (powered by Django's super-easy-and-flexible RSS framework).
July 14, 2005
We're putting the finishing touches on this site and working diligently to prepare the first public release of Django.