Django 官方教程翻译项目一份入门教程或者是参考文档(我们当然也为您准备了这些)。如果您想要马上开始一个项目,可以 从 实例教程(zh)开始入手,或者直接开始阅读详细的参考文档。 Django 无需数据库就可以使用,它提供了对象关系映射器(ORM)。通过此技术,你可以使用 Python 代码来描述数据库结构。 数据模型语法提供了很多方法来描述你的数据,这解决了多年来在数据库模式中的难题。以下是一个 简明的例子: 1. # mysite/news/models 设置。 默认情况下,配置的数据库是 SQLite,如果你对数据库不太熟,或者你只是对尝试 Django 感兴 趣,这是最简单的选择。SQLite 内嵌在 Python 里,所以你不用再安装其他东西来支持你的数据 库。但是当你开始做第一个实际的项目时,你也许想使用一个可扩展的数据库,比如 PostgreSQL 来避免令人头痛地切换数据库问题。 如果你希望使用其他数据库,你需要安装合适的 database 书栈(BookStack.CN) 构建 最后,还要注意到我们使用了 ForeignKey 外键来定义一个关系。这会告诉 Django 每个 Choice 对象都和一个 Question 对象相关联。Django 支持所有常用的数据库关系:多对一、多 对多和一对一。 上面的一小段用于创建模型的代码给了 Django 很多信息,通过这些信息,Django 可以: 为这个应用创建数据库结构(生成 CREATE TABLE0 码力 | 103 页 | 1.86 MB | 1 年前3
Django Q Documentation
Release 1.3.6PaaS compatible with multiple instances Multi cluster monitor Redis, Disque, IronMQ, SQS, MongoDB or ORM Rollbar and Sentry support Django Q is tested with: Python 3.7 and 3.8, Django 2.2.x and 3.1.x Currently disque_auth iron_mq sqs orm mongo mongo_db broker_class bulk poll cache cached scheduler error_reporter cpu_affinity Brokers Redis Disque IronMQ Amazon SQS MongoDB Django ORM Custom Broker Reference For example, with the following code # settings.py Q_CLUSTER = { 'retry': 5 'workers': 4, 'orm': 'default', } # example.py from django_q.tasks import async_task async_task('time.sleep', 22)0 码力 | 81 页 | 512.48 KB | 1 年前3
Django Q Documentation
Release 1.3.6compatible with multiple instances • Multi cluster monitor • Redis, Disque, IronMQ, SQS, MongoDB or ORM • Rollbar and Sentry support Django Q is tested with: Python 3.7 and 3.8, Django 2.2.x and 3.1.x receipts. For example, with the following code # settings.py Q_CLUSTER = { 'retry': 5 'workers': 4, 'orm': 'default', } # example.py from django_q.tasks import async_task async_task('time.sleep', 22) exceeding 256kb. 1.2.23 orm If you want to use Django’s database backend as a message broker, set the orm keyword to the database connection you want it to use: # example ORM broker connection Q_CLUSTER0 码力 | 64 页 | 453.51 KB | 1 年前3
Django Q Documentation
Release 1.3.6PaaS compatible with multiple instances Multi cluster monitor Redis, Disque, IronMQ, SQS, MongoDB or ORM Rollbar and Sentry support Django Q is tested with: Python 3.7 and 3.8, Django 2.2.x and 3.1.x Currently disque_auth iron_mq sqs orm mongo mongo_db broker_class bulk poll cache cached scheduler error_reporter cpu_affinity Brokers Redis Disque IronMQ Amazon SQS MongoDB Django ORM Custom Broker Reference For example, with the following code # settings.py Q_CLUSTER = { 'retry': 5 'workers': 4, 'orm': 'default', } # example.py from django_q.tasks import async_task async_task('time.sleep', 22)0 码力 | 81 页 | 512.34 KB | 1 年前3
Django Q Documentation
Release 0.7.18PaaS compatible with multiple instances Multi cluster monitor Redis, Disque, IronMQ, SQS, MongoDB or ORM Rollbar support Django Q is tested with: Python 2.7 & 3.5. Django 1.8.13 & 1.9.7 Contents: Installation disque_nodes disque_auth iron_mq sqs orm mongo mongo_db broker_class bulk poll cache cached scheduler rollbar cpu_affinity Brokers Redis Disque IronMQ Amazon SQS MongoDB Django ORM Custom Broker Reference Tasks payload not exceeding 256kb. orm If you want to use Django’s database backend as a message broker, set the orm keyword to the database connection you want it to use: # example ORM broker connection Q_CLUSTER0 码力 | 73 页 | 516.84 KB | 1 年前3
Django Q Documentation
Release 0.7.15PaaS compatible with multiple instances Multi cluster monitor Redis, Disque, IronMQ, SQS, MongoDB or ORM Rollbar support Django Q is tested with: Python 2.7 & 3.5. Django 1.8.8 & 1.9.1 Contents: Installation disque_nodes disque_auth iron_mq sqs orm mongo mongo_db broker_class bulk poll cache cached scheduler rollbar cpu_affinity Brokers Redis Disque IronMQ Amazon SQS MongoDB Django ORM Custom Broker Reference Tasks payload not exceeding 256kb. orm If you want to use Django’s database backend as a message broker, set the orm keyword to the database connection you want it to use: # example ORM broker connection Q_CLUSTER0 码力 | 73 页 | 528.16 KB | 1 年前3
Django Q Documentation
Release 0.7.16PaaS compatible with multiple instances Multi cluster monitor Redis, Disque, IronMQ, SQS, MongoDB or ORM Rollbar support Django Q is tested with: Python 2.7 & 3.5. Django 1.8.11 & 1.9.4 Contents: Installation disque_nodes disque_auth iron_mq sqs orm mongo mongo_db broker_class bulk poll cache cached scheduler rollbar cpu_affinity Brokers Redis Disque IronMQ Amazon SQS MongoDB Django ORM Custom Broker Reference Tasks payload not exceeding 256kb. orm If you want to use Django’s database backend as a message broker, set the orm keyword to the database connection you want it to use: # example ORM broker connection Q_CLUSTER0 码力 | 73 页 | 516.76 KB | 1 年前3
Django Q Documentation
Release 0.8.0PaaS compatible with multiple instances Multi cluster monitor Redis, Disque, IronMQ, SQS, MongoDB or ORM Rollbar support Django Q is tested with: Python 2.7 & 3.6. Django 1.8.18 LTS, 1.10.7 and 1.11 Contents: disque_nodes disque_auth iron_mq sqs orm mongo mongo_db broker_class bulk poll cache cached scheduler rollbar cpu_affinity Brokers Redis Disque IronMQ Amazon SQS MongoDB Django ORM Custom Broker Reference Tasks payload not exceeding 256kb. orm If you want to use Django’s database backend as a message broker, set the orm keyword to the database connection you want it to use: # example ORM broker connection Q_CLUSTER0 码力 | 73 页 | 506.27 KB | 1 年前3
Django Q Documentation
Release 0.7.17PaaS compatible with multiple instances Multi cluster monitor Redis, Disque, IronMQ, SQS, MongoDB or ORM Rollbar support Django Q is tested with: Python 2.7 & 3.5. Django 1.8.12 & 1.9.5 Contents: Installation disque_nodes disque_auth iron_mq sqs orm mongo mongo_db broker_class bulk poll cache cached scheduler rollbar cpu_affinity Brokers Redis Disque IronMQ Amazon SQS MongoDB Django ORM Custom Broker Reference Tasks payload not exceeding 256kb. orm If you want to use Django’s database backend as a message broker, set the orm keyword to the database connection you want it to use: # example ORM broker connection Q_CLUSTER0 码力 | 73 页 | 516.85 KB | 1 年前3
Django Q Documentation
Release 0.7.9PaaS compatible with multiple instances Multi cluster monitor Redis, Disque, IronMQ, SQS, MongoDB or ORM Python 2 and 3 Django Q is tested with: Python 2.7 & 3.5. Django 1.7.10 & 1.8.4 Contents: Installation django_redis disque_nodes disque_auth iron_mq sqs orm mongo mongo_db bulk cache cached scheduler cpu_affinity Brokers Redis Disque IronMQ Amazon SQS MongoDB Django ORM Reference Tasks Async Async Iterable Groups payload not exceeding 256kb. orm If you want to use Django’s database backend as a message broker, set the orm keyword to the database connection you want it to use: # example ORM broker connection Q_CLUSTER0 码力 | 62 页 | 514.67 KB | 1 年前3
共 64 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7













