import install

#create django_project
scripts0 = [
    ('cd %(root_path)s'),
    ('do startproject django_test'),
    ('cd django_test'),
    ('edit settings DATABASE_ENGINE sqlite3'),
    ('edit settings DATABASE_NAME %(project_path)s/data.db'),
    ('edit settings ADMINS', ("limodou", "limodou@gmail.com")),
    ('do init'),
]


scripts1 = [
    ('edit settings INSTALLED_APPS django.contrib.admin'),
    ('edit urlconf', r'^admin/', "include('django.contrib.admin.urls')"),
    ('do install admin'),
]

#create a new app
scripts2 = [
    ('do startapp test'),
    ('cd test'),
    ('mkdir templates'),
    ('mkfile templates/__init__.py'),
    ('mkdir media'),
]

#install a app
scripts3 = [
    ('edit settings INSTALLED_APPS %(project_name)s.test'),
    ('edit urlconf', r"^/test/$", "%(project_name)s.test.views.index"),
    ('do install test'),
]


install.main(scripts3)