This app does all the groundwork(forms.py
, urls.py
, templates/appname/*.html
, views.py
) needed to running a app which you can create, list, edit, view a ModelForm.
Usage:
settings.py
. INSTALLED_APPS = (
‘django.contrib.admin‘,
‘django.contrib.auth‘,
‘django.contrib.contenttypes‘,
‘django.contrib.sessions‘,
‘django.contrib.messages‘,
‘django.contrib.staticfiles‘,
‘django-scaffold‘,
...
)
models.py
file for your app with all the fields specified.Run the following command:
$ python manage.py groundwork <projectname> <appname> <modelname1> <modelname2> ..
# you can see it by using the commond below.
$ manage.py help
原文地址:http://blog.csdn.net/tmpbook/article/details/45294153