Python2.6 + django1.4 + mysql5.5 + eclipse environment setup

Source: Internet
Author: User

Recently, due to the needs of the project, I learned about Python. Now I want to write a blog for some basic things I have learned.

1. I will not talk much about installing Python and its plug-ins in eclipse. I have already introduced a previous blog post.

2. Install Pil (this installation may vary depending on the situation. I haven't installed it yet)

Pitl is short for python imaging library and is mainly used to process images. It is installed here to automatically generate thumbnails for uploaded images in Django. The installation method is quite simple. Double-click to run the. exe file and click Next. Because Python has been installed before, the installation program of PIL will read the python installation path from the registry, then, the Pil is automatically installed under Python \ Lib \ Site-packages \ Pil.

3. Install mysqldb (same as above)

Http://www.lfd.uci.edu /~ Gohlke/pythonlibs/3 mxhejtk/MySQL-python-1.2.3.win32-py2.6.exe

Command for successful installation: Click start, all programs, find the idle in Python, enter the code: Import mysqldb (of course, the premise is that the directory of pytohon and add it to the environment variable) if no error is prompted, the installation is successful.

4. mySQL and Django are installed on the Internet. I will not elaborate on them here. I installed mysql5.5 and django1.4 (Django installation: Download the downloaded django. I use django-1.4.tar.gz, use a command prompt to switch to the directory where the unzipped folder is located and run Setup. PY install, the essence of the process is to copy the decompressed folder to c: \ python26 \ Lib \ Site-packages \, and copy the django-admin.py to c: \ python26 \ scripts .)

5. Now we can develop the program. (The commands I recently used are: django-admin.py startproject..., manage. py Startapp..., manage. py runserver..., manage. py syncdb, etc)

6. Personal suggestions and thoughts:

1) I am also a beginner in Python. I have been in touch with python for just a few days. It feels pretty good and interesting. At first, we 'd better familiarize ourselves with the python development environment and program through some simple examples and exercises, the actual operations are far more advanced than those before reading the syntax;

2) at the beginning, I can practice some examples of irrelevant databases, and then I can practice examples of interaction with the database. After a few days of learning, I feel that this Django framework is a bit like the Hibernate framework in javaee, both the class and its member variable attributes are used to map tables and fields in the database, and I think the Django framework seems better at this convenience.

3) it also uses an MTV framework, similar to the MVC model. You may wish to find an example based on this framework to familiarize yourself with and practice it.

4) Life is endless, effort is not limited, not for anything, but for a better life. I always believe that it is always good to learn more. continue to struggle !!!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.