django教程

所需积分/C币:2 2018-03-09 10:36:25 6.3MB PDF

django框架,python语言的web框架,可以完成三层结构的开发
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 181 3.4 Working with forms 3.5 Templates 267 3.6 Class-based views 279 3.7 Migrations 304 3.8 Managing files 316 3.9 Testing in Django 318 3.10 User authentication in django 358 3.11 Django's cache framework 409 3. 12 Conditional View Processing 427 3.13 Cryptographic signing ..,430 3.14 Sending email ..433 3.15 Internationalization and localization 442 3.16 Logging 489 3. 17 Pagination 3. 18 Porting to Python 3 504 3.19 Security in Django 509 3.20 Performance and optimization b 513 3.21 Serializing Di bjects 519 3.22 Dian go settings 527 3.23 Signals 3.24 System check framework .536 3.25 External packages 4“How- to guides 541 4.1 Authentication using REMOTE USER 541 4.2 Writing custom django-admin commands 4.3 Writing custom model fields .548 4.4 Custom Lookups 8 4.5 Custom template tags and filters ...563 4.6 Writing a custom storage system ......580 4.7 Deploying django 581 4.8 Upgrading Django to a newer version ..593 4.9 Error g 595 4. 10 Providing initial data for models 599 4.11 Running Django on Jython 600 4. 12 Integrating Django with a legacy database 601 4.13 Outputting CSV with Django .......602 4.14 Outputting Pdhs with django 605 4.15 Overriding template 607 4.16 Managing static files(e.g images, JavaScript, CSS .609 4. 17 Deploying static files 611 4.18 How to install Django on Windows 613 4. 19 Writing database migrations ...615 5 Django fAQ 621 5.1 FAQ: General 5.2 FAQ: Installation ....624 5.3 FAQ: USing Django 625 5.4 FAQ: Getting Help 626 ““ 5.5 FAQ: Databases and models .627 5.6 FAQ: The admin 628 5.7 FAQ: Contributing code 630 5.8 Troubleshooting ....631 6 API Reference 633 6.1 application 6.2 System check framework ..,639 6.3 Built-in class-based views API 650 6.4 Clickjacking Protection 699 6.5 contrib packages 6.6 Cross Site Request Forgery protection 970 6.7 Datab 978 6.8 django-admin and manage.py 99 6.9 Running management commands from your code ..,1015 6. 10 Django Exceptions .,,,,.,,1016 6.11 File handling 1021 6.12 Forms 1028 6.13 Middleware .1090 6. 14 Migration Operations 1096 6.15 Models 1104 6.16 Request and response objects b 1236 6.17 Schemaeditor .....1251 6. 18 Settings 1254 6. 19 Signals .130l 6.20 Template 1308 6.21 TemplaceResponse and simpleTemplateResponse ..1375 6.22 Unicode data .1379 6.23 django urls utility functions b 1385 6.24 django. cor f urls utility functions 1388 6.25 Dian go Utils 1390 6.26 Validators 1405 6.27 Built-in views ....1409 7 Meta-documentation and miscellany 1413 7.1 API stability .1413 7.2 Design philosophies .1414 7.3 Third-party distributions of django ..1419 8 GI glossary 1421 9 Release notes 1423 9.1 Final releases 1423 9.2 Security releases 1701 10 Django internals 1717 10.1 Contributing to django 1717 10.2 Mailing lists 1762 10.3 Organization of the Django project 1763 10.4 Django's security policies l766 10.5 Django's release process .1769 10.6 Django Deprecation Timeline 1772 10.7 The Django source code repository 1785 10.8 How is Django Formed? ...1788 11 Indices, glossary and tables 1795 Python Module Index 1797 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.3.dev20170628014239 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 Query Sets: Executing queries I Query Set method reference I Lookup expressions Model instances: Instance 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 1.11.3. dev20170628014239 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.3.dev20170628014239 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

...展开详情
img
ze6562

关注 私信 TA的资源

上传资源赚积分,得勋章
    最新推荐