It’s easy to write a email, but it’s not easy to write a good email.
What’s a good email?
As a reader, I want to a email like this:
1. I want to know some context of this email
2. I want to get the key point of the mail immediatly from the email
3. I want to know how you support your point and if I agree with your point
4. I want to know what and when I need to do
5. I want to know which questions I need to answer
How to write a good email?
1. Subject line is key to the email
2. Begin the email by positioning
3. Set the context and explain what you need to
4. Provide the supporting data
5. Towards the end talk about what action you want by whom and by when
6. List questions you want the reader to answer clearly and directly
Other
management
I want to share a directory structure comes from my Django project.
Here is basic structure:
/PROJECT/manage.py (under svn)
/PROJECT/__init__.py (under svn)
/PROJECT/urls.py (under svn)
/PROJECT/settings.py (under svn)
/PROJECT/local_settings.py (not under svn)
/PROJECT/env.sh (not under svn)
/PROJECT/run (not under svn)
/PROJECT/apps (under svn)
/PROJECT/docs (under svn)
/PROJECT/static (under svn)
/PROJECT/templates (under svn)
/PROJECT/tests (under svn)
/PROJECT/scripts (under svn)
/PROJECT/initial_data (under svn)
/PROJECT/middlewares (under svn)
/PROJECT/patches (under svn)
/PROJECT/logs (not under svn)
/PROJECT/tmp (not under svn)
Here is the detail for each item.
- manage.py and __init__.py are default, you don’t need to change them.
- urls.py. Actually, we didn’t not write the url patterns in this file, we just include the url patterns from apps.urls in this file
- settings.py and local_settings.py. You must import local_settings.py from settings.py. In the settings.py, you have generic configuration. So you can add this file in the subversion. For in local_settings.py, we will put some particular settings based different environment. You don’t need to worry about breaking other’s environment by checking in the settings.py file any more.
- env.sh. This is a key file in this structure. With my experience, some rookies are always bothered by kinds of module not found issues. In this file you need at least add these two environment variable. They’re PYTHONPATH and DJANGO_SETTINGS_MODULE. I always add a PROJECT_HOME variable, and then I can use this later in my shell scripts. That’s very very useful.
- run. This a shell wrapping of manage.py. That’s because you always need some environment setup before you run the manage.py. Here is a example
PYTHONPATH=$PROJECT_HOME:$PYTHONPATH
DJANGO_SETTINGS_MODULE=settings
python2.5 manage.py $*
- apps directory, it’s the directory hold all of the apps.
- docs, we always put kinds of document about the project here, such as deploy document
- static directory, the static pages are always located here.
- templates, we put template here.
- tests, we plan to put the QA’s test cases there. We also will put some unit test there.
- scripts, some dba scripts located here.
- initial_data: The basic database of the site.
- patches and tmp directory is rarely used.
Python
Django, Python
Recent Comments