The bellow structure has been created by Django1.4
|-- manage.py `-- myproject |-- __init__.py |-- settings.py |-- urls.py `-- wsgi.py
The __init__.py files are required to make Python treat the directories as containing packages; this is done to prevent directories with a common name, such as string, from unintentionally hiding valid modules that occur later on the module search path. In the simplest case, __init__.py can just be an empty file, but it can also execute initialization code for the package or set the __all__ variable, described later.
These scripts are the same in priciple, with the differences, django-admin.py is Django’s command-line utility for administrative tasks.
In addition, manage.py is automatically created in each Django project. manage.py is a thin wrapper around django-admin.py that takes care of two things for you before delegating to django-admin.py:
The django-admin.py script should be on your system path if you installed Django via its setup.py utility. If it’s not on your path, you can find it in site-packages/django/bin within your Python installation. Consider symlinking it from some place on your path, such as /usr/local/bin.
For Windows users, who do not have symlinking functionality available, you can copy django-admin.py to a location on your existing path or edit the PATH settings (under Settings - Control Panel - System - Advanced - Environment...) to point to its installed location.
Generally, when working on a single Django project, it’s easier to use manage.py. Use django-admin.py with DJANGO_SETTINGS_MODULE, or the --settings command line option, if you need to switch between multiple Django settings files.
Usage django-admin.py <command> [options] manage.py <command> [options]
Django includes an internal "dispatcher" which provides two pieces of functionality:
The actual mechanism comes from a third-party library called PyDispatcher, which is bundled with Django and which lives at django.dispatch.dispatcher. To improve performance the API and implementation has been refactored, as described at the end of this document.