This is what I suggest:
* A separate `forms.py` file (to discourage keeping form classes in
`views.py` file)
* Separate `middleware.py` and `mixins.py` files (for the same reason as
above, and to make the third party app architectures more similar to
django itself, with less doubts for the developer)
* A separate `urls.py` file (this is another file I find always creating
myself just after the app creation)
* Refactor `tests.py` in a `tests` module, also to encourage modularity of
the testsuite instead of creating a mammoth `tests.py` file by adding
"just one more test case" and avoiding the hassle of refactoring the whole
thing after some development
I forked the django project on github and created a branch in my
repository, here: https://github.com/mcagl/django/tree/mcagl/better-
startapp-template
The branch does not conflict with the `master` branch
--
Ticket URL: <https://code.djangoproject.com/ticket/28307>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => wontfix
Comment:
You can raise the idea on the DevelopersMailingList but past discussions
(search that mailing list's archives for "startapp" and "startproject") to
add files or reorganize has not yielded consensus about it -- that's why
there's an option for custom project/app templates. The Django master
branch no longer suppots Python 2, so `# coding: utf-8` would be obsolete.
--
Ticket URL: <https://code.djangoproject.com/ticket/28307#comment:1>
--
Ticket URL: <https://code.djangoproject.com/ticket/28307#comment:2>
Comment (by Natalia Bidart):
Related to ticket #25943
--
Ticket URL: <https://code.djangoproject.com/ticket/28307#comment:3>