4. The django-marcador app¶
The aim of the tutorial is to create a Django app to manage bookmarks. Now that the project is created and configured, you can begin to work on the app itself.
4.1. Create the app¶
You can create the app with the following command:
$ python manage.py startapp marcador
A new directory marcador
will be created with the following
comments:
marcador
|-- __init__.py
|-- admin.py
|-- migrations
| `-- __init__.py
|-- models.py
|-- tests.py
`-- views.py
The directory is found under the project directory mysite
:
mysite
|-- manage.py
|-- marcador
| |-- __init__.py
| |-- admin.py
| |-- migrations
| | `-- __init__.py
| |-- models.py
| |-- tests.py
| `-- views.py
|-- mysite
| |-- __init__.py
| |-- settings.py
| |-- urls.py
| `-- wsgi.py
|-- static
`-- templates
Finally, add your new app marcador
to INSTALLED_APPS
in the file
settings.py
:
33 34 35 36 37 38 39 40 41 | INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'marcador',
)
|