From 2402221264e1b72ababeeef5db4596f7873e55ba Mon Sep 17 00:00:00 2001 From: a <455919189@qq.com> Date: Tue, 17 May 2022 20:58:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'test/Django-2.1.15/docs'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/Django-2.1.15/docs/conf.py | 372 +++++++++++++++++++++++++++ test/Django-2.1.15/docs/glossary.txt | 77 ++++++ test/Django-2.1.15/docs/index.txt | 347 +++++++++++++++++++++++++ 3 files changed, 796 insertions(+) create mode 100644 test/Django-2.1.15/docs/conf.py create mode 100644 test/Django-2.1.15/docs/glossary.txt create mode 100644 test/Django-2.1.15/docs/index.txt diff --git a/test/Django-2.1.15/docs/conf.py b/test/Django-2.1.15/docs/conf.py new file mode 100644 index 0000000..13d6780 --- /dev/null +++ b/test/Django-2.1.15/docs/conf.py @@ -0,0 +1,372 @@ +# Django documentation build configuration file, created by +# sphinx-quickstart on Thu Mar 27 09:06:53 2008. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# The contents of this file are pickled, so don't put values in the namespace +# that aren't picklable (module imports are okay, they're removed automatically). +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +from os.path import abspath, dirname, join + +# Workaround for sphinx-build recursion limit overflow: +# pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL) +# RuntimeError: maximum recursion depth exceeded while pickling an object +# +# Python's default allowed recursion depth is 1000 but this isn't enough for +# building docs/ref/settings.txt sometimes. +# https://groups.google.com/d/topic/sphinx-dev/MtRf64eGtv4/discussion +sys.setrecursionlimit(2000) + +# Make sure we get the version of this copy of Django +sys.path.insert(1, dirname(dirname(abspath(__file__)))) + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.append(abspath(join(dirname(__file__), "_ext"))) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +needs_sphinx = '1.6.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [ + "djangodocs", + 'sphinx.ext.extlinks', + "sphinx.ext.intersphinx", + "sphinx.ext.viewcode", +] + +extlinks = { + 'commit': ('https://github.com/django/django/commit/%s', ''), + 'cve': ('https://nvd.nist.gov/view/vuln/detail?vulnId=%s', 'CVE-'), + 'ticket': ('https://code.djangoproject.com/ticket/%s', '#'), +} + +# Spelling check needs an additional module that is not installed by default. +# Add it only if spelling check is requested so docs can be generated without it. +if 'spelling' in sys.argv: + extensions.append("sphinxcontrib.spelling") + # Workaround for https://bitbucket.org/dhellmann/sphinxcontrib-spelling/issues/13 + html_use_smartypants = False + +# Spelling language. +spelling_lang = 'en_US' + +# Location of word list. +spelling_word_list_filename = 'spelling_wordlist' + +# Add any paths that contain templates here, relative to this directory. +# templates_path = [] + +# The suffix of source filenames. +source_suffix = '.txt' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'contents' + +# General substitutions. +project = 'Django' +copyright = 'Django Software Foundation and contributors' + + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '2.1' +# The full version, including alpha/beta/rc tags. +try: + from django import VERSION, get_version +except ImportError: + release = version +else: + def django_release(): + pep440ver = get_version() + if VERSION[3:5] == ('alpha', 0) and 'dev' not in pep440ver: + return pep440ver + '.dev' + return pep440ver + + release = django_release() + +# The "development version" of Django +django_next_version = '2.2' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# Location for .po/.mo translation files used when language is set +locale_dirs = ['locale/'] + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build', '_theme'] + +# The reST default role (used for this markup: `text`) to use for all documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +add_module_names = False + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'trac' + +# Links to Python's docs should reference the most recent version of the 3.x +# branch, which is located at this URL. +intersphinx_mapping = { + 'python': ('https://docs.python.org/3/', None), + 'sphinx': ('http://www.sphinx-doc.org/en/master/', None), + 'psycopg2': ('http://initd.org/psycopg/docs/', None), +} + +# Python's docs don't change every week. +intersphinx_cache_limit = 90 # days + +# The 'versionadded' and 'versionchanged' directives are overridden. +suppress_warnings = ['app.add_directive'] + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = "djangodocs" + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +html_theme_path = ["_theme"] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = ["_static"] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%b %d, %Y' + +# Content template for the index page. +# html_index = '' + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Djangodoc' + +modindex_common_prefix = ["django."] + +# Appended to every page +rst_epilog = """ +.. |django-users| replace:: :ref:`django-users ` +.. |django-core-mentorship| replace:: :ref:`django-core-mentorship ` +.. |django-developers| replace:: :ref:`django-developers ` +.. |django-announce| replace:: :ref:`django-announce ` +.. |django-updates| replace:: :ref:`django-updates ` +""" + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { + 'preamble': ( + '\\DeclareUnicodeCharacter{2264}{\\ensuremath{\\le}}' + '\\DeclareUnicodeCharacter{2265}{\\ensuremath{\\ge}}' + '\\DeclareUnicodeCharacter{2665}{[unicode-heart]}' + '\\DeclareUnicodeCharacter{2713}{[unicode-checkmark]}' + ), +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, document class [howto/manual]). +# latex_documents = [] +latex_documents = [ + ('contents', 'django.tex', 'Django Documentation', + 'Django Software Foundation', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [( + 'ref/django-admin', + 'django-admin', + 'Utility script for the Django Web framework', + ['Django Software Foundation'], + 1 +)] + + +# -- Options for Texinfo output ------------------------------------------------ + +# List of tuples (startdocname, targetname, title, author, dir_entry, +# description, category, toctree_only) +texinfo_documents = [( + master_doc, "django", "", "", "Django", + "Documentation of the Django framework", "Web development", False +)] + + +# -- Options for Epub output --------------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = project +epub_author = 'Django Software Foundation' +epub_publisher = 'Django Software Foundation' +epub_copyright = copyright + +# The basename for the epub file. It defaults to the project name. +# epub_basename = 'Django' + +# The HTML theme for the epub output. Since the default themes are not optimized +# for small screen space, using the same theme for HTML and epub output is +# usually not wise. This defaults to 'epub', a theme designed to save visual +# space. +epub_theme = 'djangodocs-epub' + +# The language of the text. It defaults to the language option +# or en if the language is not set. +# epub_language = '' + +# The scheme of the identifier. Typical schemes are ISBN or URL. +# epub_scheme = '' + +# The unique identifier of the text. This can be an ISBN number +# or the project homepage. +# epub_identifier = '' + +# A unique identification for the text. +# epub_uid = '' + +# A tuple containing the cover image and cover page html template filenames. +epub_cover = ('', 'epub-cover.html') + +# A sequence of (type, uri, title) tuples for the guide element of content.opf. +# epub_guide = () + +# HTML files that should be inserted before the pages created by sphinx. +# The format is a list of tuples containing the path and title. +# epub_pre_files = [] + +# HTML files shat should be inserted after the pages created by sphinx. +# The format is a list of tuples containing the path and title. +# epub_post_files = [] + +# A list of files that should not be packed into the epub file. +# epub_exclude_files = [] + +# The depth of the table of contents in toc.ncx. +# epub_tocdepth = 3 + +# Allow duplicate toc entries. +# epub_tocdup = True + +# Choose between 'default' and 'includehidden'. +# epub_tocscope = 'default' + +# Fix unsupported image types using the PIL. +# epub_fix_images = False + +# Scale large images. +# epub_max_image_width = 0 + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# epub_show_urls = 'inline' + +# If false, no index is generated. +# epub_use_index = True diff --git a/test/Django-2.1.15/docs/glossary.txt b/test/Django-2.1.15/docs/glossary.txt new file mode 100644 index 0000000..f24a33e --- /dev/null +++ b/test/Django-2.1.15/docs/glossary.txt @@ -0,0 +1,77 @@ +======== +Glossary +======== + +.. glossary:: + + concrete model + A non-abstract (:attr:`abstract=False + `) model. + + field + An attribute on a :term:`model`; a given field usually maps directly to + a single database column. + + See :doc:`/topics/db/models`. + + generic view + A higher-order :term:`view` function that provides an abstract/generic + implementation of a common idiom or pattern found in view development. + + See :doc:`/topics/class-based-views/index`. + + model + Models store your application's data. + + See :doc:`/topics/db/models`. + + MTV + "Model-template-view"; a software pattern, similar in style to MVC, but + a better description of the way Django does things. + + See :ref:`the FAQ entry `. + + MVC + `Model-view-controller`__; a software pattern. Django :ref:`follows MVC + to some extent `. + + __ https://en.wikipedia.org/wiki/Model-view-controller + + project + A Python package -- i.e. a directory of code -- that contains all the + settings for an instance of Django. This would include database + configuration, Django-specific options and application-specific + settings. + + property + Also known as "managed attributes", and a feature of Python since + version 2.2. This is a neat way to implement attributes whose usage + resembles attribute access, but whose implementation uses method calls. + + See :class:`property`. + + queryset + An object representing some set of rows to be fetched from the database. + + See :doc:`/topics/db/queries`. + + slug + A short label for something, containing only letters, numbers, + underscores or hyphens. They're generally used in URLs. For + example, in a typical blog entry URL: + + .. parsed-literal:: + + https://www.djangoproject.com/weblog/2008/apr/12/**spring**/ + + the last bit (``spring``) is the slug. + + template + A chunk of text that acts as formatting for representing data. A + template helps to abstract the presentation of data from the data + itself. + + See :doc:`/topics/templates`. + + view + A function responsible for rendering a page. diff --git a/test/Django-2.1.15/docs/index.txt b/test/Django-2.1.15/docs/index.txt new file mode 100644 index 0000000..31a641e --- /dev/null +++ b/test/Django-2.1.15/docs/index.txt @@ -0,0 +1,347 @@ +==================== +Django documentation +==================== + +.. rubric:: Everything you need to know about Django. + +Getting help +============ + +Having trouble? We'd like to help! + +* Try the :doc:`FAQ ` -- it's got answers to many common questions. + +* Looking for specific information? Try the :ref:`genindex`, :ref:`modindex` or + the :doc:`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`_. + +* Report bugs with Django in our `ticket tracker`_. + +.. _archives: https://groups.google.com/group/django-users/ +.. _post a question: https://groups.google.com/d/forum/django-users +.. _#django IRC channel: irc://irc.freenode.net/django +.. _ticket tracker: https://code.djangoproject.com/ + +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: + +* :doc:`Tutorials ` take you by the hand through a series of + steps to create a Web application. Start here if you're new to Django or Web + application development. Also look at the ":ref:`index-first-steps`" below. + +* :doc:`Topic guides ` discuss key topics and concepts at a + fairly high level and provide useful background information and explanation. + +* :doc:`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. + +* :doc:`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 knowledge of how Django works. + +.. _index-first-steps: + +First steps +=========== + +Are you new to Django or to programming? This is the place to start! + +* **From scratch:** + :doc:`Overview ` | + :doc:`Installation ` + +* **Tutorial:** + :doc:`Part 1: Requests and responses ` | + :doc:`Part 2: Models and the admin site ` | + :doc:`Part 3: Views and templates ` | + :doc:`Part 4: Forms and generic views ` | + :doc:`Part 5: Testing ` | + :doc:`Part 6: Static files ` | + :doc:`Part 7: Customizing the admin site ` + +* **Advanced Tutorials:** + :doc:`How to write reusable apps ` | + :doc:`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:** + :doc:`Introduction to models ` | + :doc:`Field types ` | + :doc:`Indexes ` | + :doc:`Meta options ` | + :doc:`Model class ` + +* **QuerySets:** + :doc:`Making queries ` | + :doc:`QuerySet method reference ` | + :doc:`Lookup expressions ` + +* **Model instances:** + :doc:`Instance methods ` | + :doc:`Accessing related objects ` + +* **Migrations:** + :doc:`Introduction to Migrations` | + :doc:`Operations reference ` | + :doc:`SchemaEditor ` | + :doc:`Writing migrations ` + +* **Advanced:** + :doc:`Managers ` | + :doc:`Raw SQL ` | + :doc:`Transactions ` | + :doc:`Aggregation ` | + :doc:`Search ` | + :doc:`Custom fields ` | + :doc:`Multiple databases ` | + :doc:`Custom lookups ` | + :doc:`Query Expressions ` | + :doc:`Conditional Expressions ` | + :doc:`Database Functions ` + +* **Other:** + :doc:`Supported databases ` | + :doc:`Legacy databases ` | + :doc:`Providing initial data ` | + :doc:`Optimize database access ` | + :doc:`PostgreSQL specific features ` + +The view layer +============== + +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:** + :doc:`URLconfs ` | + :doc:`View functions ` | + :doc:`Shortcuts ` | + :doc:`Decorators ` + +* **Reference:** + :doc:`Built-in Views ` | + :doc:`Request/response objects ` | + :doc:`TemplateResponse objects ` + +* **File uploads:** + :doc:`Overview ` | + :doc:`File objects ` | + :doc:`Storage API ` | + :doc:`Managing files ` | + :doc:`Custom storage ` + +* **Class-based views:** + :doc:`Overview ` | + :doc:`Built-in display views ` | + :doc:`Built-in editing views ` | + :doc:`Using mixins ` | + :doc:`API reference ` | + :doc:`Flattened index` + +* **Advanced:** + :doc:`Generating CSV ` | + :doc:`Generating PDF ` + +* **Middleware:** + :doc:`Overview ` | + :doc:`Built-in middleware classes ` + +The template layer +================== + +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: + +* **The basics:** + :doc:`Overview ` + +* **For designers:** + :doc:`Language overview ` | + :doc:`Built-in tags and filters ` | + :doc:`Humanization ` + +* **For programmers:** + :doc:`Template API ` | + :doc:`Custom tags and filters ` + +Forms +===== + +Django provides a rich framework to facilitate the creation of forms and the +manipulation of form data. + +* **The basics:** + :doc:`Overview ` | + :doc:`Form API ` | + :doc:`Built-in fields ` | + :doc:`Built-in widgets ` + +* **Advanced:** + :doc:`Forms for models ` | + :doc:`Integrating media ` | + :doc:`Formsets ` | + :doc:`Customizing validation ` + +The development process +======================= + +Learn about the various components and tools to help you in the development and +testing of Django applications: + +* **Settings:** + :doc:`Overview ` | + :doc:`Full list of settings ` + +* **Applications:** + :doc:`Overview ` + +* **Exceptions:** + :doc:`Overview ` + +* **django-admin and manage.py:** + :doc:`Overview ` | + :doc:`Adding custom commands ` + +* **Testing:** + :doc:`Introduction ` | + :doc:`Writing and running tests ` | + :doc:`Included testing tools ` | + :doc:`Advanced topics ` + +* **Deployment:** + :doc:`Overview ` | + :doc:`WSGI servers ` | + :doc:`Deploying static files ` | + :doc:`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: + +* :doc:`Admin site ` +* :doc:`Admin actions ` +* :doc:`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: + +* :doc:`Security overview ` +* :doc:`Disclosed security issues in Django ` +* :doc:`Clickjacking protection ` +* :doc:`Cross Site Request Forgery protection ` +* :doc:`Cryptographic signing ` +* :ref:`Security Middleware ` + +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: + +* :doc:`Overview ` | + :doc:`Internationalization ` | + :ref:`Localization ` | + :doc:`Localized Web UI formatting and form input ` +* :doc:`Time zones ` + +Performance and optimization +============================ + +There are a variety of techniques and tools that can help get your code running +more efficiently - faster, and using fewer system resources. + +* :doc:`Performance and optimization overview ` + +Geographic framework +==================== + +:doc:`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:** + :doc:`Overview ` | + :doc:`Using the authentication system ` | + :doc:`Password management ` | + :doc:`Customizing authentication ` | + :doc:`API Reference ` +* :doc:`Caching ` +* :doc:`Logging ` +* :doc:`Sending emails ` +* :doc:`Syndication feeds (RSS/Atom) ` +* :doc:`Pagination ` +* :doc:`Messages framework ` +* :doc:`Serialization ` +* :doc:`Sessions ` +* :doc:`Sitemaps ` +* :doc:`Static files management ` +* :doc:`Data validation ` + +Other core functionalities +========================== + +Learn about some other core functionalities of the Django framework: + +* :doc:`Conditional content processing ` +* :doc:`Content types and generic relations ` +* :doc:`Flatpages ` +* :doc:`Redirects ` +* :doc:`Signals ` +* :doc:`System check framework ` +* :doc:`The sites framework ` +* :doc:`Unicode in Django ` + +The Django open-source project +============================== + +Learn about the development process for the Django project itself and about how +you can contribute: + +* **Community:** + :doc:`How to get involved ` | + :doc:`The release process ` | + :doc:`Team organization ` | + :doc:`The Django source code repository ` | + :doc:`Security policies ` | + :doc:`Mailing lists ` + +* **Design philosophies:** + :doc:`Overview ` + +* **Documentation:** + :doc:`About this documentation ` + +* **Third-party distributions:** + :doc:`Overview ` + +* **Django over time:** + :doc:`API stability ` | + :doc:`Release notes and upgrading instructions ` | + :doc:`Deprecation Timeline `