SO I'm playing with Django's data modeling tonight. Django is a python framework similar to RubyOnRails. It manages the model in the code and all that jazz.
But its default behavior is to follow the relationships between entities in the wrong direction. For example, given the canonical Poll data model, you have polls, and the polls have choices. The natural outcome is that the choices have a reference to their parent poll. The admin interface lets you defines polls, but then go into a choices interface where you can create choices and pick the associated poll. It seems really akward to manage the choices as independant entities. Instead, I'd rather have an 'add choice' option on the 'edit poll' screens. You can do it, but it looks like you have to rework the code.
Anyway, I've been working in my spare time on a similar framework, except that it is in java, and it builds persistence code and administrative interfaces reverse engineered from existing databases. As I sit here, it occurs to me that I could rework that project to generate Django models from the db.
Knowing that the python and java camps co-exists somewhat begrudgingly, perhaps I should promote the J to the initial position and call my java django tool 'J-dango'. I could use little paper-bag-and-maccaroni puppets to promote it.
glenn said on 2005-09-08 06:34:10:
What Adrian also didn't mention is that django-admin already had schema-reversing via the inspectdb [dbname] command. D'Oh!
glenn said on 2005-09-04 18:03:33:
Wow. Python lets you do anything! AS instructed I'm reviewing tutorial 2, and I see: def was_published_today(self): return self.pub_date.date() == datetime.date.today() was_published_today.short_description = 'Was published today' Tossing a 'short_description' attribute on a function. That's powerful.
glenn said on 2005-09-04 16:51:58:
Adrian Holovaty said on 2005-09-03 15:57:06:
> The admin interface lets you defines polls, but > then go into a choices interface where you can > create choices and pick the associated poll. It > seems really akward to manage the choices as > independant entities. Instead, I'd rather have an > 'add choice' option on the 'edit poll' screens. > You can do it, but it looks like you have to > rework the code. That's completely inaccurate. It's very, very easy to allow for managing choices on the poll admin page. There's an option called "edit_inline" whose purpose is precisely to enable that. See Tutorial 2 for full information. Look for the section with this text: "It'd be better if you could add a bunch of Choices directly when you create the Poll object." Adrian (Django developer)
Jay said on 2005-09-03 14:40:27:
And your first users conference can be the "J-dango Fandango"
error sifting isotopes local variable 'maxk' referenced before assignment error making suggestion 'NoneType' object has no attribute 'category_label'