On Thu, Dec 17, 2009 at 5:02 AM, bruno desthuilliers
<[email protected]> wrote:
...
>
> [1] currently 970 LOCs, and I just have the basic models structures
> and only one custom manager defined yet, so I know there will be more
> to come. YMMV but I don't like modules growing much bigger than 1 to
> 1.5 KLOC.

In general I agree that many small files are nice.  And in the case of
view.py, forms.py, etc., django doesn't know about those names specially.
view files are referred to in your url.py, which itself is just
referred to in your
root url.py, which is referred to in your settings.py, so all their names can
change without any problem, other than making your code harder for
someone else to maintain.

But the name models is known specially by the framework.

All in all, I don't care much how many lines there are in a models.py file.
After all, I don't use notepad, with its 64kib limit,  to edit python code.
I *do* care how many lines there are in a class, since that is the unit
that I must understand.  Moving those classes into separate files doesn't
make them smaller.

I do, also, prefer small apps.  When I needed to rework the (pinax) profile
app, I was happy to only have to copy that to change, rather than having to
include django.contrib.auth, account, emailconfirmation, and who knows
what else has a close relationship with django.contrib.auth.  So I don't
care how many models are in a module, but I think that five is about as
many as I would want in an app.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to