Python 初学者想通过 Django 框架写一个博客,一个月内完成任务,大致的学习路线怎么安排?
两年后更新:现在已经在知乎从事 Python 相关的工作。看看当初的自己,真是很幼稚,继续加油。
回复内容:
- 一个小时看python的语法和基本数据类型: http://woodpecker.org.cn/abyteofpython_cn/chinese/;
- 一个小时看HTTP基础,知道浏览器是怎么发请求的就行(Google搜“HTTP请求”);
- 一天时间过一遍django docs https://docs.djangoproject.com/en/1.4/ ;
- 同时搭环境让django应用能跑起来;
- 开着python手册,开着django手册,开着google,开始动手写吧,碰见不会的就翻手册搜google。
如果已经有Python和Django基础,可以直接看这个Python - Django 搭建简易博客
手把手教你用Django 开发一个简单的博客,涉及 Django Web开发,MVC,Template等。

如果对Python或Django不熟悉,按下面路线走。
Python - Python快速教程
Python - Python Django Web框架 其实难度不在于编程语言(例如 Python),而是你的 web 知识。
我在做博客时,觉得最耗时间的是需求、数据库设计和用户体验,这些都是需要很多经验才能做好的。因此建议你先使用优秀的博客软件,确定你能在哪些地方做得更好,再去动手。
附带自己的开发过程,也许会有帮助: Doodle博客的开发过程 用django写后台很方便,很快就能搭起来,但我觉得博客关键的是前端的展示,除了学django还得学点前端的东西 如果有HTTP,HTML,CSS,JS基础,看两样东西即可
1、python入门教材一本,推荐 《learning python》
2、Django教材,直接先照官方的那4个入门step做一遍,接下去,需要那部分就看哪部分的文档,但是推荐先看比较完整再实际动手,因为可能你有疑问或觉得自己已经会的地方,其实文档已经提到或有更好的解决方案。 学完 python 想学 django,正好我最近组织了一个 django 新人学习小组,并开始一边学习一边做项目实践。正好目前进行到第一周,小组正在做一个 Blog 程序,虽然简单,但是足以带你进入 django 开发的大门,欢迎 follow 我们,并期待您的建议和意见。
简单介绍一下小组的运作模式:我们在每个周末会开一个小组讨论会,讨论下一周的开发内容,每个人根据其分配的任务去学习相应的文档。但是不仅仅是做完自己的工作就完事了,每个人在学习的过程中还要把自己学的东西讲给全小组的人听(主要是写成一份和自己工作相关的文档),让其他的组员都明白你做了什么,这样你不仅学到了自己该学的,也学到了其他组员学到的东西。
目前我们正在进行第一周的项目,第一周的学习文档已经出来了,发布在简书上:Django学习小组出品:一起来做一个简单的Blog第一周文档(教程)。我把摘要部分贴出来,感兴趣的朋友可以去简书上阅读原文。
此外欢迎关注我们的 github 组织首页,所有项目的相关源代码都会上传到 github 上。每周更新,但是代码量不大,确保在新人的接受范围内,这样可以让新手完全跟上我们的学习和开发进度。
第一周文档的摘要:这一周我们小组完成了 Blog 首页的搭建。
——by Django 学习小组,期待您的建议和意见 参考Udacity CS253这门公开课:Classroom - Udacity,虽然框架用的是webapp2,但可以作为基础。 建议先弄清楚自己的目的:本节是 django blog 项目的开篇,是 django 学习小组的集体学习成果。django学习小组是由我发起的一个促进 django 新手互相学习、互相帮助的组织。小组在一边学习 django 的同时将一起完成三个项目:
- 一个简单django blog,用于发布小组每周的学习和开发文档
- django中国社区,为国内的 django 开发者们提供一个长期维护的 django 社区,聚集全国的 django 开发者到这个社区上来
- django 问答社区, 类似于segmentfault 和 stackoverflow但更加专注(只专注于 django 开发的问题)的问答社区
目前小组正在完成第一个项目,本文即是该项目第一周的相关文档。
更多的信息请关注我们的 github 组织首页,本教程项目的相关源代码也已上传到 github 上。
同时,你也可以加入我们的邮件列表 django_study@groups.163.com ,随时关注我们的动态,我们会将每周的详细开发文档和代码通过邮件列表发出。
如有任何建议,欢迎提 Issue,欢迎fork,pull request,当然也别忘了 Starred 哦!
每周更新,敬请关注
如果是为了学习,那么就好好学些python,然后学习http相关知识,django是开发时方便,但是对于学习web开发知识来说,并不是太合适;
如果只是为了建个人博客,直接用wordpress,比自己写的好太多. 作为一“通过django入门python”的少年表示,当然是
1,照着tutorial来一遍,了解django模块式开发
2,翻doc依次了解M V C ,和如何与数据库交互
3,学习如何配置和定制settings.py
4,学模版标记语言前端js,尤其是ajax
然后你会发现django耦合性太高了,转头去学web.py,好自由,想怎么搞就怎么搞,想用什么模版引擎就用什么模版引擎,而且你已经具备在django下的模块式开发的习惯了。
最后贴一个我根据django自带的权限模块写的用户管理工程http://github.com/raphaelsoul/supermilai
有些bug没修复,多坑慎入,仅当开思路 我也在学Python,有基础的话可以试试这样:
1、《Learn Python The Hard Way 第2版》:http://learnpythonthehardway.org/book/
2、《The Django Book》:http://fy.py3k.cn/
3、中文书:http://blog.csdn.net/lanphaday/article/details/6204639
仅供参考,谢谢。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



This article will explain how to improve website performance by analyzing Apache logs under the Debian system. 1. Log Analysis Basics Apache log records the detailed information of all HTTP requests, including IP address, timestamp, request URL, HTTP method and response code. In Debian systems, these logs are usually located in the /var/log/apache2/access.log and /var/log/apache2/error.log directories. Understanding the log structure is the first step in effective analysis. 2. Log analysis tool You can use a variety of tools to analyze Apache logs: Command line tools: grep, awk, sed and other command line tools.

Python excels in gaming and GUI development. 1) Game development uses Pygame, providing drawing, audio and other functions, which are suitable for creating 2D games. 2) GUI development can choose Tkinter or PyQt. Tkinter is simple and easy to use, PyQt has rich functions and is suitable for professional development.

The comparison between Laravel and Python in the development environment and ecosystem is as follows: 1. The development environment of Laravel is simple, only PHP and Composer are required. It provides a rich range of extension packages such as LaravelForge, but the extension package maintenance may not be timely. 2. The development environment of Python is also simple, only Python and pip are required. The ecosystem is huge and covers multiple fields, but version and dependency management may be complex.

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

This article discusses the DDoS attack detection method. Although no direct application case of "DebianSniffer" was found, the following methods can be used for DDoS attack detection: Effective DDoS attack detection technology: Detection based on traffic analysis: identifying DDoS attacks by monitoring abnormal patterns of network traffic, such as sudden traffic growth, surge in connections on specific ports, etc. This can be achieved using a variety of tools, including but not limited to professional network monitoring systems and custom scripts. For example, Python scripts combined with pyshark and colorama libraries can monitor network traffic in real time and issue alerts. Detection based on statistical analysis: By analyzing statistical characteristics of network traffic, such as data

This article will guide you on how to update your NginxSSL certificate on your Debian system. Step 1: Install Certbot First, make sure your system has certbot and python3-certbot-nginx packages installed. If not installed, please execute the following command: sudoapt-getupdatesudoapt-getinstallcertbotpython3-certbot-nginx Step 2: Obtain and configure the certificate Use the certbot command to obtain the Let'sEncrypt certificate and configure Nginx: sudocertbot--nginx Follow the prompts to select

The readdir function in the Debian system is a system call used to read directory contents and is often used in C programming. This article will explain how to integrate readdir with other tools to enhance its functionality. Method 1: Combining C language program and pipeline First, write a C program to call the readdir function and output the result: #include#include#include#includeintmain(intargc,char*argv[]){DIR*dir;structdirent*entry;if(argc!=2){

To maximize the efficiency of learning Python in a limited time, you can use Python's datetime, time, and schedule modules. 1. The datetime module is used to record and plan learning time. 2. The time module helps to set study and rest time. 3. The schedule module automatically arranges weekly learning tasks.
