This week I continued to work on the "startapp" command of
django.core.management and changed its default behaviour to create a
standalone application (with skeleton files) when you run: "django-
admin.py startapp myapp". Current skeleton files are: release.py,
setup.py, MANIFEST.in, docs/, test/, myapp/, myapp/templates/myapp.
Are there any generic files/folders to add?
Besides editing release.py manually you can now edit the meta
information by running inside an application dir: "django-admin.py
editapp". This also moves the app directory on a name change.
You can find a ReleaseWrapper dictionary object at
django.utils.package which can be used to read and edit your release
>> import os
>> from django.utils.package import ReleaseWrapper, DEFAULT_DIRECTORIES, DEFAULT_FILES
>> release = ReleaseWrapper(os.getcwd())
>> print (release.NAME, release.VERSION)
>> release.previous_name = release.NAME
>> release.NAME = "myapp2"
>> release['VERSION'] = "0.2"
>> release.update(os.getcwd(), DEFAULT_DIRECTORIES, DEFAULT_FILES)
/Desktop/test_app/myapp to /Users/Jannis
The application is ready to be used by setuptools, e.g. creating a zip-
like "egg" file ("python setup.py bdist_egg") which then can be
distributed and installed with setuptools' easy_install command.
Creating a stripped down project-based application (models.py,
views.py), which is currently recommended by the tutorials, run:
"django-admin.py --noskeleton startapp mysimpleapp"
Please have a look at http://code.google.com/p/django-package/ for
further details, full installation instructions and of course the
And please, tell me what you think :)