Home > django > [django] init_app.py: complete the initialization of an app.

[django] init_app.py: complete the initialization of an app.

I wrote a simple script called init_app.py that completes the initialization of a Django application.

You create a new app. like this:

./manage.py startapp APP_NAME

However, the generated app. is far from complete. Put init_app.py next to manage.py (in the same folder) and execute the following command:

./init_app.py APP_NAME

Currently, it performs the following actions:

  • inside the app., create the folder static/APP_NAME
  • inside the app., create the folder templates/APP_NAME
  • inside the app., create a sample urls.py file

Links

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: