Comments on: Moving Django models into their own module http://blog.amber.org/2009/01/19/moving-django-models-into-their-own-module/ Thoughts of a minor lunatic Wed, 21 Oct 2009 01:55:36 +0000 http://wordpress.org/?v=2.9.2 hourly 1 By: James Bennett http://blog.amber.org/2009/01/19/moving-django-models-into-their-own-module/comment-page-1/#comment-52869 James Bennett Wed, 21 Jan 2009 01:50:04 +0000 http://blog.amber.org/?p=3619#comment-52869 The ticket to watch is #3591: http://code.djangoproject.com/ticket/3591 It started out as a request for something better/more unique than app_label (since it's possible to end up with multiple applications that have the same automatic app_label), but that quickly develops into the need to support a few other use cases: * A way to specify the human-readable name of the application (and mark it for translation). * A way to have multiple instances of the same application (usually the admin) in use simultaneously, possibly with different configuration for each one. * A way to cleanly "know" what application a given model belongs to, even if the models are split across multiple files. The ticket itself hasn't seen a whole lot of activity in a while, but there've been discussions on the dev list, on IRC, and in person at sprints and conferences dedicated to working it out. For the moment there's no clear consensus on the right API, but it's something I'd like to see get more attention for, say, Django 1.2 later this year. The ticket to watch is #3591: http://code.djangoproject.com/ticket/3591

It started out as a request for something better/more unique than app_label (since it’s possible to end up with multiple applications that have the same automatic app_label), but that quickly develops into the need to support a few other use cases:

  • A way to specify the human-readable name of the application (and mark it for translation).
  • A way to have multiple instances of the same application (usually the admin) in use simultaneously, possibly with different configuration for each one.
  • A way to cleanly “know” what application a given model belongs to, even if the models are split across multiple files.

    The ticket itself hasn’t seen a whole lot of activity in a while, but there’ve been discussions on the dev list, on IRC, and in person at sprints and conferences dedicated to working it out. For the moment there’s no clear consensus on the right API, but it’s something I’d like to see get more attention for, say, Django 1.2 later this year.

]]>
By: petrilli http://blog.amber.org/2009/01/19/moving-django-models-into-their-own-module/comment-page-1/#comment-52868 petrilli Tue, 20 Jan 2009 20:05:25 +0000 http://blog.amber.org/?p=3619#comment-52868 I wonder if perhaps there might be some "convention over configuration" that works toward this working. For me, at least, modules make infinitely more sense than dumping everything in a single file. For a tiny application, that's not a major issue, but it quickly gets out of hand. I didn't see a ticket on this, is there somewhere to track? I wonder if perhaps there might be some “convention over configuration” that works toward this working. For me, at least, modules make infinitely more sense than dumping everything in a single file. For a tiny application, that’s not a major issue, but it quickly gets out of hand.

I didn’t see a ticket on this, is there somewhere to track?

]]>
By: James Bennett http://blog.amber.org/2009/01/19/moving-django-models-into-their-own-module/comment-page-1/#comment-52867 James Bennett Tue, 20 Jan 2009 16:36:44 +0000 http://blog.amber.org/?p=3619#comment-52867 I think part of the documentation issue is that anything covered in the official docs automatically gets covered by the API stability policy, and this is something that hasn't been finalized (there's work ongoing to develop a cleaner way to do this, most likely by providing an abstraction over the idea of a "Django application" since that would solve several things in one fell swoop). I think part of the documentation issue is that anything covered in the official docs automatically gets covered by the API stability policy, and this is something that hasn’t been finalized (there’s work ongoing to develop a cleaner way to do this, most likely by providing an abstraction over the idea of a “Django application” since that would solve several things in one fell swoop).

]]>
By: Placing Django Models In Separate Files « Andrew Wilkinson http://blog.amber.org/2009/01/19/moving-django-models-into-their-own-module/comment-page-1/#comment-52866 Placing Django Models In Separate Files « Andrew Wilkinson Tue, 20 Jan 2009 13:20:24 +0000 http://blog.amber.org/?p=3619#comment-52866 [...] Placing Django Models In Separate Files Posted January 20, 2009 Filed under: web development | Tags: django | Chris Petrilli has made a very useful post on placing Django models into separate files. [...] [...] Placing Django Models In Separate Files Posted January 20, 2009 Filed under: web development | Tags: django | Chris Petrilli has made a very useful post on placing Django models into separate files. [...]

]]>
By: Bulkan Evcimen http://blog.amber.org/2009/01/19/moving-django-models-into-their-own-module/comment-page-1/#comment-52865 Bulkan Evcimen Tue, 20 Jan 2009 02:04:06 +0000 http://blog.amber.org/?p=3619#comment-52865 "Thanks to Magnus-" I think you mean Magus- ? “Thanks to Magnus-”

I think you mean Magus- ?

]]>