Django 官方教程翻译项目
Python 2 下请使用 __unicode__ 18. return self.headline 然后,运行 Django 命令行工具来创建数据库表。 1. $ python manage.py migrate migrate 命令会查找所有可用的模型,如果数据库中没有与之对应的表,则会为其自动创建。 Django 也提供了其他更丰富的控制方式。 接下来,你就可以使用一套便捷而丰富的 Django 如果你使用的是 Jython(一种 Java 平台的 Python 实现),你需要做一些额外的步骤。查看在 Jython 上运行 Django 获 取详细信息。 你可以在终端下输入命令 python 来验证是否已经安装 Python;你应该看到下面的信息: 1. Python 3.4.x 2. [GCC 4.x] on linux 3. Type "help", "copyright" 一个让公众查看投票内容并进行投票的公共站点。 一个能让你增加、修改和删除投票的管理界面。 我们假设你已经成功 安装 Django(zh)。如果你不清楚是否已经安装 Django 或不清楚安装的 是哪个版本,请运行以下命令: 1. $ python -m django --version 如果已安装,你会看到安装的版本号;如果还没安装,你会看到错误提示:“No module named django”。 本教程的目标版本是0 码力 | 103 页 | 1.86 MB | 1 年前3Django、Vue 和Element UI 前后端原理论述
Rest Framework->数据库配置 简要说明: 安装相关包:在开始之前,首先需要安装 Python 和 pip,然后安装 Django 等相关包, 可以使用 pip 命令来安装。 创建工程:使用 Django 的命令行工具创建 Django 项目,例如:django-admin startproject projectname。 后端依赖(pipenv)创建虚拟环境:建议使用 pipenv 结构。 前端依赖(npm install):在项目目录下执行 npm install 命令,安装项目所需的前端 4 《51 测试天地》七十四 www.51testing.com 依赖包,这些依赖包通常存储在 package.json 文件中。 前端服务配置启动:在项目目录下执行 npm run serve 命令,启动前端开发服务器, 可以在浏览器中预览项目。 三、关键技术介绍 1、后端 Pipfile.lock 文件中,这样可以确保项目在不同环境中安装相同的依赖版本。 简化依赖安装:使用 Pipenv 安装依赖非常简单,只需要运行一个命令即可,而不需 要手动管理依赖的安装。 提供更友好的命令行界面:Pipenv 提供了一组易于使用的命令,使得包管理和虚拟 环境管理更加直观和简便。 支持开发模式:Pipenv 支持将项目的开发依赖和运行时依赖分开,这样可以减少项 目打包时的冗余依赖。0 码力 | 61 页 | 6.84 MB | 1 年前3Django 1.8.x Documentation
get it Differences between versions Writing your first patch for Django Introduction Installing Git Getting a copy of Django’s development version Rolling back to a previous revision of Django Running documentation is kept in the same source control system as its code. It lives in the docs directory of our Git repository. Each document online is a separate text file in the repository. Where to get it You can (aka “trunk”), note that the docs/ directory contains all of the documentation. You can update your Git checkout to get the latest changes. One low-tech way of taking advantage of the text documentation0 码力 | 2454 页 | 2.85 MB | 1 年前3Django 1.11.x Documentation
Differences between versions Writing your first patch for Django Introduction Code of Conduct Installing Git Getting a copy of Django’s development version Rolling back to a previous revision of Django Running documentation is kept in the same source control system as its code. It lives in the docs directory of our Git repository. Each document online is a separate text file in the repository. Where to get it You can (aka “trunk”), note that the docs/ directory contains all of the documentation. You can update your Git checkout to get the latest changes. One low-tech way of taking advantage of the text documentation0 码力 | 2747 页 | 2.67 MB | 1 年前3Django 1.10.x Documentation
Differences between versions Writing your first patch for Django Introduction Code of Conduct Installing Git Getting a copy of Django’s development version Rolling back to a previous revision of Django Running documentation is kept in the same source control system as its code. It lives in the docs directory of our Git repository. Each document online is a separate text file in the repository. Where to get it You can (aka “trunk”), note that the docs/ directory contains all of the documentation. You can update your Git checkout to get the latest changes. One low-tech way of taking advantage of the text documentation0 码力 | 2538 页 | 2.59 MB | 1 年前3Django 2.0.x Documentation
Differences between versions Writing your first patch for Django Introduction Code of Conduct Installing Git Getting a copy of Django’s development version Rolling back to a previous revision of Django Running documentation is kept in the same source control system as its code. It lives in the docs directory of our Git repository. Each document online is a separate text file in the repository. Where to get it You can (aka “trunk”), note that the docs/ directory contains all of the documentation. You can update your Git checkout to get the latest changes. One low-tech way of taking advantage of the text documentation0 码力 | 2746 页 | 2.67 MB | 1 年前3Django 1.11.x Documentation
documentation is kept in the same source control system as its code. It lives in the docs directory of our Git repository. Each document online is a separate text file in the repository. 2.11.4 Where to get it (aka “trunk”), note that the docs/ directory contains all of the documentation. You can update your Git checkout to get the latest changes. One low-tech way of taking advantage of the text documentation documentation in our Git repository contains the “latest and greatest” changes and additions. These changes often include documentation of new features added in the Django development version – the Git (“trunk”)0 码力 | 1878 页 | 6.40 MB | 1 年前3Django 1.10.x Documentation
documentation is kept in the same source control system as its code. It lives in the docs directory of our Git repository. Each document online is a separate text file in the repository. 2.11.4 Where to get it (aka “trunk”), note that the docs/ directory contains all of the documentation. You can update your Git checkout to get the latest changes. One low-tech way of taking advantage of the text documentation documentation in our Git repository contains the “latest and greatest” changes and additions. These changes often include documentation of new features added in the Django development version – the Git (“trunk”)0 码力 | 1817 页 | 6.19 MB | 1 年前3Django 1.8.x Documentation
documentation is kept in the same source control system as its code. It lives in the docs directory of our Git repository. Each document online is a separate text file in the repository. 2.10.4 Where to get it (aka “trunk”), note that the docs/ directory contains all of the documentation. You can update your Git checkout to get the latest changes. One low-tech way of taking advantage of the text documentation documentation in our Git repository contains the “latest and greatest” changes and additions. These changes often include documentation of new features added in the Django development version – the Git (“trunk”)0 码力 | 1685 页 | 6.01 MB | 1 年前3django cms 3.3.x Documentation
Install the application from its GitHub repository using pip: pip install git+http://git@github.com/divio/django-polls.git#egg=polls Let’s add this application to our project. Add 'polls' to the end also places it in your virtualenv’s src directory as a cloned Git repository: pip install -e git+http://git@github.com/divio/django- polls.git#egg=polls You should end up with a folder structure similar GitHub repository to your own GitHub account 2. Clone your fork locally: git clone git@github.com:YOUR_USERNAME/django-cms.git 3. Create a virtualenv: virtualenv cms-develop source cms-develop/bin/activate0 码力 | 386 页 | 1.56 MB | 1 年前3
共 55 条
- 1
- 2
- 3
- 4
- 5
- 6