实例介绍
Django 中提供了开发网站经常用到的模块,常见的代码都为你写好了,通过减少重复的代码,Django 使你能够专注于 web 应用上有 趣的关键性的东西。为了达到这个目标,Django 提供了通用Web开发模式的高度抽象,提供了频繁进行的编程作业的快速解决方法,以及为“如何解决问题”提供了清晰明了的约定。Django的理念是DRY(Don't Repeat Yourself)来鼓励快速开发!
Contents 1 Django documentation 1.1 Getting help 1. 2 How the documentation is organized 1.3 First steps 2 1. 4 The model laye 1. 5 The view layer 2 1.6Th plate la 1.7 Forms 1. 8 The development process 1. 9 The admin 1.10 Security 1.11 Internationalization and localization 4 1. 12 Performance and optimization 1.13 Python compatibility 1. 14 Geographic framework 1. 15 Common Web application tools 1.16 Other core functionalities 1.17 The D urce project 2 Getting started 7 2.1Di t a gla 2.2 Quick install guid 12 2.3W our first Django app, part 13 2.4 Writing your first Django app, part 2 2.5 Writing your first Django app part 3 2.6 Writing your first Django app, part 4 37 2.7 Writing your fin ngo app, p 42 2.8 Writing your first Django app, part 6 2.9 Writing your first Django app, part 7 2.10 Advanced tutorial: How to write reusable apps 2.11 What to read next 2. 12 Writing your first patch for Djang 70 3 USing django 3.1 How to install D 3.2 Models and databases 3.3Handlinghttprequests 18 3.4 Working with forms .223 3.5 Templates 269 3.6 Class-based views 281 3.7 Migrations 306 3.8 Managing files 318 3.9 Testing in Django 320 3.10 User authentication in django 360 3.11 Django's cache framework 3. 12 Conditional View Processing 44 3.13 Cryptographic signing ..,432 3.14 Sending email 435 3.15 Internationalization and localization 3.16 Logging 491 3. 17 Pagination 501 3. 18 Porting to Python 3 506 3. 19 Security in Django 3.20 Performance and optimization b 515 3.21 Serializing Django objects ....521 3.22 Dian go settings 529 3.23 Signals .534 3.24 System check framework .538 3.25 External packages ..,,.,,541 4“How- to guides 543 4.1 Authentication using REMOTE USER .543 4.2 Writing custom django-admin commands 4.3 Writing custom model fields .550 4.4 Custom Lookups 561 4.5 Custom template tags and filters ...566 4.6 Writing a custom storage system 582 4.7 Deploying django 584 4.8 Upgrading Django to a newer version .596 4.9 Error reporting 598 4. 10 Providing initial data for models 602 4.11 Running Django on Jython ..603 4. 12 Integrating Django with a legacy database 604 4.13 Outputting CSV with Django ..,,...605 4.14 Outputting Pdhs with django 608 4.15 Overriding templates ..,,,,.610 4.16 Managing static files(e.g images, JavaScript, CSS 61 4. 17 Deploying static files .614 4.18 How to install Django on Windows 616 4. 19 Writing database migrations 617 5 Django fAQ 623 5.1 FAQ: General ....623 5.2 FAQ: Installation 626 5.3 FAQ: USing Django 627 5.4 FAQ: Getting Help ““ 628 5.5 FAQ: Databases and models .629 5.6 FAQ: The admin 630 5.7 FAQ: Contributing code 632 5.8 Troubleshooting ....633 6 API Reference 635 6.1 application 635 6.2 System check framework ..,641 6.3 Built-in class-based views API 652 6.4 Clickjacking Protection 6.5 contrib packages 703 6.6 Cross Site Request Forgery protection 973 6.7 Datab 6.8 django-admin and manage.py 994 6.9 Running management commands from your code ..,1018 6. 10 Django Exceptions ...,....1019 6.11 File handling 1024 6.12 Forms ...1031 6.13 Middleware .1093 6. 14 Migration Operations ..1099 6.15 Models 1107 6.16 Request and response objects b 1240 6.17 Schemaeditor 1254 6. 18 Settings 1257 6.19 Signals .1304 6.20 Templates 1311 6.21 TemplaceResponse and simpleTemplateResponse ..1378 6.22 Unicode data 1382 6.23 django urls utility functions b 1388 6.24 django. cor f urls utility functions 1391 6.25 Dian go Utils 1393 6.26 Validators 1408 6.27 Built-in views ..1412 7 Meta-documentation and miscellany 1415 7.1 API stability l415 7.2 Design philosophies .1416 7.3 Third-party distributions of django 1421 8 Glossary 1423 9 Release notes 1425 9.1 Final releases 1425 9.2 Security releases 1705 10 Django internals 1723 10.1 Contributing to django 1723 10.2 Mailing lists 1768 10.3 Organization of the Django project 1769 10.4 Django's security policies 1772 10.5 Django's release process .1775 10.6 Django Deprecation Timeline ..,1778 10.7 The Django source code repository 10.8 How is Django Formed? 1794 11 Indices, glossary and tables 1801 Python Module Index 1803 CHAPTER 1 Django documentation Everything you need to know about Django. Getting help Having trouble? We'd like to help! Try the FAg-it's got answers to many common questions Looking for specific information? Try the genindex, modindex or the detailed table of contents Search for information in the archives of the django-users mailing list, or post a question Ask a question in the #django IrC channel, or search the IrC logs to see if it's been asked before Report bugs with django in our ticket tracker How the documentation is organized Django has a lot of documentation. a high-level overview of how it's organized will help you know where to look for certain things Django or Web application development. Also look at the "First steps below ation Start here if you're new to Tutorials take you by the hand through a series of steps to create a Web appl Topic guides discuss key topics and concepts at a fairly high level and provide useful background information Reference guides contain technical reference for APIs and other aspects of Django's machinery. They describe how it works and how to use it but assume that you have a basic understanding of key concepts How-to guides are recipes. They guide you through the steps involved in addressing key problems and use-cases They are more advanced than tutorials and assume some know ledge of how django works Django documentation release 1.11.6.dev20170929143212 First steps Are you new to Django or to programming? This is the place to start From scratch Overview Installation Tutorial: Part 1: Requests and responses I Part 2: Models and the admin site I part 3: Views and templates I Part 4: Forms and generic views I Part 5: Testing I Part 6: Static files I Part 7: Customizing the admin site Advanced Tutorials: How to write reusable apps I Writing your first patch for Django The model layer Django provides an abstraction layer(the"models")for structuring and manipulating the data of your Web application Learn more about it below Models: Introduction to models I Field types I Indexes I Meta options I Model class QuerySets: Making queries I Query Set method reference I Lookup expressions Model instances: In stance methods I Accessing related objects Migrations: Introduction to Migrations I Operations reference I Schema Editor I Writing migrations Advanced: Managers I Raw SQL I Transactions I Aggregation I Search I Custom fields I Multiple databases Custom lookups I Query Expressions I Conditional Expressions I Database Functions Other: Supported databases I Legacy databases I Providing initial data l Optimize database access I Postgre SOL specific features The view laver Django has the concept of views"to encapsulate the logic responsible for processing a user's request and for returning the response. Find all you need to know about views via the links below The basics: URLconfs I view functions I Shortcuts I Decorators Reference: Built-in Views I Request/response objects I TemplateResponse objects File uploads: Overview I File objects I Storage API I Managing files I Custom storage Class-based views: Overview I Built-in display views I Built-in editing views I Using mirins I AP/ reference I Flattened index Advanced: Generuling CSV I Generating PDF Middleware: Overview I Built-in middleware classes The template laver The template layer provides a designer-friendly syntax for rendering the information to be presented to the user. Learn how this syntax can be used by designers and how it can be extended by programmers TThe basics: Overview For designers: Language overview I Built-in tags and filters I humanization Chapter 1. Django documentation Django Documentation, Release 111.6.dev20170929143212 For programmers: Template APl I Custom tags and filters Forms Django provides a rich framework to facilitate the creation of forms and the manipulation of form data The basics: Overview I Form APl I Built-in fields I Built-in widgets Advanced: Forms for models I Integrating media I Formsets I Customizing validation The development process Learn about the various components and tools to help you in the development and testing of django applications Settings: Overview I Full list of settings Applications: Overview Exceptions: Overview django-admin and manage, py: Overview I Adding custom commands Testing: Introduction I Writing and running tests Included testing tools Advanced topics Deployment: Overview I WsGl servers I Deploying static files I Tracking code errors by email The admin Find all you need to know about the automated admin interface, one of Django's most popular features · Admin site Admin actions Admin documentation generator Security Security is a topic of paramount importance in the development of Web applications and django provides multiple protection tools and mechanisms · Security overview Disclosed security issues in django Clickjacking protection Cross Site request Forgery protection Cryptographic signing Security middleware 17. Forms 3 Django documentation release 1.11.6.dev20170929143212 Internationalization and localization Django offers a robust internationalization and localization framework to assist you in the development of applications for multiple languages and world regions Overview I Internationalization I Localization I Localized Web UI formatting and form input · Time zones Performance and optimization ere are a variety of techniques and tools that can help get your code running more efficiently -faster, and using fewer system resources Performance and optimization overview Python compatibility Django aims to be compatible with multiple different flavors and versions of Python Jython support Python 3 compatibility Geographic framework GeoDjango intends to be a world-class geographic Web framework. Its goal is to make it as easy as possible to build GIS Web applications and harness the power of spatially enabled data Common Web application tools Django offers multiple tools commonly needed in the development of web applications Authentication: Overview I Using the authentication system I Password management I Customizing authentica tion I APl reference Logging Sending emails Syndication feeds(RSS/Atom) ● Pagination Messages framework serialization Sessions sitemaps Static files management Chapter 1. Django documentation 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论