No web development experience or background. It has basic C language and python syntax. What are the basic requirements for django learning? What is the learning sequence of django? The time was quite short. I made a hand-stretched party that I had always despised. Sorry .. No web development experience or background.
It has basic C language and python syntax.
What are the basic requirements for django learning?
What is the learning sequence of django?
The time was quite short. I made a hand-stretched party that I had always despised. Sorry .. Reply: paste a pitfall that has been dug a long time ago. Unfortunately, this pitfall has not been filled. Some knowledge points are listed in the middle, which is the framework at that time. In this order, we can gradually deepen our understanding of Django.
Learn Django from scratch
Python Web Development Guide
Why write this tutorial?
-There are more and more new people learning Django in China. Many people cannot learn about Django because they do not have a good tutorial and have a wrong understanding of Django.
-I have been using Django for many years and want to do something to give back to the community.
-Currently, I have not seen any excellent Chinese tutorials. If so, I do not need to write more.
-The existing documents and tutorials are not designed for beginners.
-If you follow the tutorials that teach you how to create a blog, it is like learning go only knows the regular expression, or reading only the conclusions of the thesis, rather than the proof process. Beginners need to know how it works instead of how to use it.
-New users who have certain programming basics and want to learn Django's website development skills
-Django users who have been using Django for a while and want to learn more about Django's principles and practical skills
How to Learn
-This article mainly guides beginners to understand Django's design ideas step by step. There are good documents for the introduction of each section of Django and will be referenced in large quantities.
-Read the referenced documents.
-Read the referenced source code.
-When you do not understand why, read the source code
Most of the content is a summary of my personal experience. If there are errors or inaccuracies, please correct them.
1. website development Basics
Although it is a Django tutorial, considering that most of those who are studying Django do not have a deep understanding of website development, here are some basic knowledge.
Many friends cannot learn Django because they lack the support of basic knowledge,
Website development history
HTML & HTTP
2. The worst Web framework in history
Urldispatcher and function
3. What does Django look like?
Urls. py and views. py
4. Configuration File
5. Organize code by app
6. Communicate with the database
7. Form Processing
8. Better page generation
10. contrib apps
11. Use the correct method to organize the website source code
12. Third-party package
15. advanced topics
In fact, the best way to learn is to read the source code. Read the Django source code and read the source code of a third-party package. And then imitate and learn from it. When you see more, you can tell the difference between good and bad.
These two days I learned django by myself and found that the core is not the syntax, but a little familiar with the database and understanding the website logic. The following premise is that you have basic python syntax knowledge and want to know something like a decorator (you only need to see where you can remember this thing? Then I can find it back. It is enough to know that this is called a decorator, just to be able to google). But what you really need to understand is that I am afraid you can start to learn django with the foundation of a class. Learning = learning + practice. Learning and practice are called learning. It is easy to forget what you learn if you don't learn it. You have to learn it again when you want to write a project. This is thankless, if you are impatient, do not focus on the number of page tutorials you have learned in a day. You can finish reading this tutorial in XX days.
(1) understand the website logic. MTV refers to the model processing business logic. view refers to the view function, and T refers to the template. The client first logs on to a website (refer to the http authority guide for content less than 10% at the top. The book is thick, but you only need to read this part first. Reading is also the most basic and easy-to-understand part, I hope I don't feel the pressure on this.) Then I will make a DNS explanation (that is, I will explain the website back to the IP address), and then the server receives the request and extracts data from the database through the model, and then views, then it is rendered based on templates. Front-end files such as images, css, and js are saved in static state, and the information is sent to the user (it doesn't matter if you don't understand this section: learn html and css first, there is also the most basic part of http, which can be understood immediately after looking back at the framework explanation ).
(2) Learn flask and django together. It is better to learn wamp (php) together. Because you will find that their directories are similar, you need to view, template, and so on, the logic is consistent. It seems that it takes more than twice as long as it actually saves a lot of time. Because the amount of code is actually very small, the key is understanding-understanding is fast, it takes less time, and the cost of learning the most basic part of other languages is worth comparing and learning, because it can speed up understanding. If necessary, write code in person to test whether you really master it (for example, flask has a blueprint function-it is a difficult point, but you can use four files according to the content in the book, 14 lines of code will be understood immediately after being written .)
(3) You can configure a database or any database. django has An orm to control the database, and you do not need to write the statements of the database. Therefore, there is no difference in learning it. You only need to know the difference between SQL and NoSQL.
(4) After configuring the database, if you use mysql and read the old tutorial, congratulations, you have learned from google to solve the problem that mysql does not support python3.4 (in fact, It is supported, I have not found any accurate tutorials on the Internet ). If you do not understand the knowledge point, you can find it. If you cannot find it, you can ask. If you really cannot ask, you can skip it. Stackoverflow is recommended for many people to ask questions. However, in English, segmentfault is recommended. Learning English at the beginning is not very relevant. When you realize that English is important, it is not too late to learn it. You have not realized that it is "said to be very important" before, and you are worried about your low level.
(5) When you look at an instance, you can understand the three steps to add content to the website in the simplest case. One is to add content to the database model, and the other is to establish URL ing, that is, view, third, place the rendered page in the template. The highest level of python knowledge used here is class. There may be a decorator in flask to establish the ing relationship between the url and the view function, or because the framework is "light", a lot of import is required, this kind of diy advice is still familiar with getting started with django when you are no longer worried about the web.
(7) after it is improved, such as dynamic URLs, front-end loading, compatibility, and other issues, it will be thrown to github. In this process, you may find that some difficult-to-understand and strange issues in the development of win have blocked you, so you can get a ubuntu12.04 in the next vitualbox to learn Common commands, development in linux directly (getting started with linux requires a cost. It is easy for new users to learn python and linux, but after learning a considerable program, linux can avoid many windows problems, such as some tutorials, Chinese or English, and only the versions below linux-This saves you time ). At the same time, don't bother using github in this process. github is not only useful when many people work together, but it will automatically record the modified version of history, which is also very useful for organizing more and more large programs. It may take several hours to learn about github basics. Then, you can search for "best practices" on the Internet and use them.
(8) It takes much more time to query problems and configurations than to understand the code and write code. Make sure that you repeat the unfamiliar code. The advantage is that you can learn the logic of programming, and it is easier to understand it. Focusing on learning quality is actually focusing on learning speed. As in the beginning, learning = learning + practice.
(9) It is best to combine Chinese and English in the tutorial. Chinese can be accepted more quickly, while important Chinese materials are missing in English. The cooperation between the two is more efficient.
P.S. self-taught programming knowledge is one aspect. However, psychological burden and human guidance are the key factors that affect the progress and efficiency, it is also very reasonable-"impatience is understandable", so it is very important to understand that "Quality assurance is actually speed assurance, specifically, "linux may not be a big headache. It is not a burden but an accelerator to start learning programming and accessing multiple languages ". However, to the end, technology will take a long time. Any experience and reference can only make the entire process easier. I hope the above experience will be helpful. I agree with what I said above. I will not repeat it. I will give you a hand and a favorite address:
Django official Tutorrial Chinese version: Getting started-Django 1.5 documentation
Django is a Web framework in the MVC (Django called MTV) mode. Without Web experience, it would not be very quick to learn any framework. Django may be easy to use first.
We recommend that you take a look at the MVC mode (there are a lot of tutorials on the Network), and read some basic knowledge about HTML, CSS, and JS. The w3shool tutorial is OK.
To learn about Django, you can refer to the official documentation. The official documentation has something similar to introduction. If you find it difficult to understand, you can first search for the Chinese version of django book.
With a preliminary understanding of the Web Framework/Django, you can take a deeper look at some Django features.
For your reference only. Since, django has been used, but django has not been used in the past year. tornado is mainly used for work reasons.
I learned about django as a pick-and-pick application. Today I want to go and read the official document, it is interesting to find something new in the document.
Django worth learning (my favorite part)
- ORM (easy, convenient, and elegant. Although many people have criticized its implementation and performance, I don't think a programmer should be able to pull performance without starting from the ground up. Aside from the business needs, performance is purely a rogue, of course, I have nothing to say if you don't rebuild the code once when the product goes online or goes offline)
- Self-built User Auth (the scalability and security do not need to be built with a piece of shit, so it is safe and easy to worry about. People you can think of already think)
- Url mapping)
- Compared with other template systems, the templates of tornado throw several streets and use tags to implement complicated things.
- Poor compatibility, paralyze I used to migrate from 1.4 to 1.5 for a while. In a few days, 1.6 came out again. I quickly migrated myself to several applications, another one has not completed the migration of 1.7 and Nima has come out, and there is no way to smoothly migrate all, it is said that there are now 1.8, but I am not interested in using it for the moment.
To sum up, if you want to focus on writing business as soon as you get started, using django is your best choice. Other frameworks are lightweight, but it is inevitable to duplicate the wheel, our current project uses tornado. It takes nearly two months for us to write a happy business simply by writing a suitable underlying framework.
As for how to learn it, I will not mention it. Just do it. If you encounter any problems, refer to the official documents. After learning python, I want to learn django. I recently organized
New django Study Group
And start to learn and practice projects. As of the first week, the team is working on a Blog program. Although it is simple, it is enough to bring you into the django development gate. Welcome to follow and look forward to your suggestions and comments.
A Brief Introduction to the group's Operation Model: we will hold a group discussion every weekend to discuss the development content of the next week. Each person will learn the relevant documents based on their assigned tasks. But it's not just about finishing your work, in the course of learning, everyone should also tell the people in the group what they have learned (mainly to write a document related to their work ), let other members understand what you did, so that you not only learned what you should, but also learned what other members learned.
At present, we are working on the project for the first week. The learning documents for the first week have been published in the short book: Django Learning Group: let's make a simple Blog first week document (Tutorial ). I posted the abstract Part. Interested friends can read the original text in the simplified book.
In addition, you are welcome to follow our github organization homepage. The source code of all projects will be uploaded to github. Updates are updated every week, but the amount of code is small. Make sure that you are within the scope of acceptance of new users, so that new users can keep up with our learning and development progress.
Summary of the document for week 1: this week, our team completed the establishment of the Blog homepage.
This section is the beginning of the django blog project.Django Learning GroupThe results of collective learning.Django Learning GroupIt is an organization initiated by me to promote the mutual learning and help of New django beginners. While learning django, the group will complete three projects:
- A simple django blogUsed to publish weekly learning and development documents of a group.
- Django Chinese communityTo provide a long-maintained django community for Chinese django developers and gather django developers from all over the country to this community.
- Django Q & A community, Similar to segmentfault and stackoverflow, but more focused (only focused on django development issues) in the Q & A community
The team is currently completing the first project. This article is the relevant documentation for the first week of the project.
For more information, see our github homepage. The source code of this Tutorial Project has been uploaded to github.
At the same time, you can also join our mailing list email@example.com, stay tuned to our dynamics at any time, we will send weekly detailed development documentation and code via the mailing list.
If you have any suggestions, please refer to Issue and fork and pull request. Of course, don't forget Starred!
Updated every week. Stay tuned.
-- By Django study group, looking forward to your suggestions and comments http://djangobook.py3k.cn/2.0/
This Chinese translation is good.
This book is applicable to versions earlier than 1.0 and is easier to learn. The current version 1.6.1 may be a little more complex.
What about basic knowledge? I think it is as follows:
In my personal understanding, CGI refers to the boss (HTML) who calls the employee (py) to do things. At present, Django is more advanced. The boss has a secretary (url. py) and uses urls. py to let employees (views. py) do things.
A regular expression, at least a bit. (To the extent that some urls can be written using regular expressions, you can give them to the secretary (urls. py ).
- Click Command Line
- Basic HTML syntax ~)
- Database knowledge, such as creating databases and tables. (Create, select, etc .)
- Python syntax is similar.
- Although CGI is not very useful, it helps us understand the ing relationship:
Ps: I only see Chapter 8, so I know this need. If I want to learn more, I will go to google and stackoverflow.
Sharing! Change as early as possible... The document is clear and easy to learn.
The basics must be common. In simple terms, html, css, js, and database SQL, as well as the most critical Python. It seems that encoding is a big problem, and others are very convenient.