Django 1.9.10基础教程源代码

如果你刚接触 Django,或者还在用老版本的框架,那么这份《Django 基础教程》书籍的源代码,绝对是个不错的起点。它针对的是 Django 1.9.10 版本,但即使你现在用的是 Django 2.2.2 或更高版本,这份代码也挺有参考价值,虽然有些地方需要稍微调整。你能在源代码中学到不少 Django 的核心概念,比如如何定义模型、创建视图、使用模板,以及如何做URL 路由。而且源代码里还涵盖了像表单、数据库操作和用户认证等实用功能,完全能让你理解如何把这些基本概念落实到实际项目中。

Django 的项目结构清晰,尤其是文件夹和文件的安排。manage.pysettings.pyurls.py等基础文件,都能让你快速上手。源代码里也展示了如何用startapp创建应用,以及如何注册到settings.py里。

,老版本的代码在新版本 Django 中有点小问题,比如有些 API 变了、功能被废弃了,但也正好能让你了解 Django 的演进过程。所以,如果你是 Django 的初学者,或者想回顾一下框架的基本原理,这份源代码是个棒的练习资料。

如果你对新版 Django 的改动有兴趣,记得关注源代码中的细节差异,尤其是在API 变更性能优化方面。

rar
code.rar 预估大小:47个文件
folder
code 文件夹
file
readme.md 48B
folder
tango_with_django_project 文件夹
file
populate_rango.py 3KB
folder
templates 文件夹
folder
registration 文件夹
file
login.html 1KB
file
registration_form.html 1KB
file
registration_complete.html 207B
file
logout.html 181B
folder
rango 文件夹
file
index-pre-chapter8.html 1KB
file
add_page.html 2KB
file
search.html 1000B
file
cats.html 385B
file
index.html 2KB
file
base.html 685B
file
add_category.html 707B
file
profile_registration.html 316B
file
add_category-pre-chapter12.html 1KB
file
category.html 3KB
file
index-pre-chapter12.html 1KB
file
list_profiles.html 930B
file
profile.html 974B
file
base_bootstrap.html 4KB
file
temp.html 12KB
file
page_list.html 222B
file
about.html 1KB
folder
media 文件夹
file
cat.jpg 22KB
folder
tango_with_django_project 文件夹
file
wsgi.py 427B
folder
__init__.py 文件夹
file
settings.py 4KB
file
urls.py 1KB
folder
static 文件夹
folder
images 文件夹
file
rango.jpg 95KB
file
favicon.ico 5KB
folder
js 文件夹
file
rango-jquery.js 424B
file
rango-ajax.js 869B
file
manage.py 268B
folder
rango 文件夹
file
models.py 1KB
file
apps.py 126B
file
webhose_search.py 5KB
folder
__init__.py 文件夹
file
views.py 10KB
file
admin.py 397B
folder
templatetags 文件夹
folder
__init__.py 文件夹
file
rango_template_tags.py 231B
file
bing_search.py 4KB
file
tests.py 8KB
file
urls.py 990B
file
views_ajax.py 2KB
file
forms.py 2KB
file
requirements.txt 117B
rar 文件大小:147.07KB