Django CMS 3.11.10 Documentationapplication and integrate it into the CMS. Create a plugin model In the models.py of polls_cms_integration add the following: This creates a plugin model class; these all inherit from the cms.models.pluginmodel pluginmodel.CMSPlugin (or a sub- class thereof) and not models.Model [https://docs.djangoproject.com/en/4.2/ref/models/instances/#django.db.models.Model]. Create and run migrations: The Plugin Class Now create plugin naming is: PollPluginModel: the model class PollPluginPublisher: the plugin class A second convention is also countered quite frequently: Poll: the model class PollPlugin: the plugin class You don’t0 码力 | 493 页 | 1.44 MB | 6 月前0.03
peewee Documentation Release 2.10.2Contents: Installing and Testing Installing with git Running tests Optional dependencies Quickstart Model Definition Storing data Retrieving Data Working with existing databases What next? Example app Running Generating skeleton code Adding a new Database Driver Models and Fields Fields Creating model tables Model options and table metadata Indexes and Constraints Non-integer Primary Keys, Composite Keys Store Shortcuts Signal support pwiz, a model generator Schema Migrations Reflection Database URL CSV Utils Connection pool Read Slaves Test Utils pskel Flask Utils API Reference Models Fields Query Types0 码力 | 275 页 | 276.96 KB | 1 年前3
Django 1.11.x DocumentationDjango documentation contents Getting started Django at a glance Design your model Install it Enjoy the free API A dynamic admin interface: it’s not just scaffolding – it’s the whole house Design your Writing your first Django app, part 2 Database setup Creating models Activating models Playing with the API Introducing the Django Admin Writing your first Django app, part 3 Overview Writing more views Write Database transactions Multiple databases Tablespaces Database access optimization Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads0 码力 | 2747 页 | 2.67 MB | 1 年前3
Django 2.0.x DocumentationDjango documentation contents Getting started Django at a glance Design your model Install it Enjoy the free API A dynamic admin interface: it’s not just scaffolding – it’s the whole house Design your Writing your first Django app, part 2 Database setup Creating models Activating models Playing with the API Introducing the Django Admin Writing your first Django app, part 3 Overview Writing more views Write Multiple databases Tablespaces Database access optimization Database instrumentation Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads0 码力 | 2746 页 | 2.67 MB | 1 年前3
Django 1.10.x DocumentationDjango documentation contents Getting started Django at a glance Design your model Install it Enjoy the free API A dynamic admin interface: it’s not just scaffolding – it’s the whole house Design your Writing your first Django app, part 2 Database setup Creating models Activating models Playing with the API Introducing the Django Admin Writing your first Django app, part 3 Overview Writing more views Write Database transactions Multiple databases Tablespaces Database access optimization Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads0 码力 | 2538 页 | 2.59 MB | 1 年前3
Django CMS 3.9.x Documentationtake a basic Django opinion poll application and integrate it into the CMS. 4.1. Create a plugin model In the models.py of polls_cms_integration add the following: from django.db import models from cms on_delete=models.CASCADE) def __str__(self): return self.poll.question This creates a plugin model class; these all inherit from the cms.models.pluginmodel.CMSPlugin base class. Note django CMS plugins pluginmodel.CMSPlugin (or a sub- class thereof) and not models.Model [https://docs.djangoproject.com/en/2.2/ref/models/instances/#django.db.models.Model]. Create and run migrations: python manage.py makemigrations0 码力 | 417 页 | 1.68 MB | 6 月前3
django cms 3.7.x Documentationtake a basic Django opinion poll application and integrate it into the CMS. 4.1. Create a plugin model In the models.py of polls_cms_integration add the following: from django.db import models from cms on_delete=models.CASCADE) def __str__(self): return self.poll.question This creates a plugin model class; these all inherit from the cms.models.pluginmodel.CMSPlugin base class. Note django CMS plugins pluginmodel.CMSPlugin (or a sub- class thereof) and not models.Model [https://docs.djangoproject.com/en/2.2/ref/models/instances/#django.db.models.Model]. Create and run migrations: python manage.py makemigrations0 码力 | 409 页 | 1.67 MB | 1 年前3
Django 2.1.x DocumentationDjango documentation contents Getting started Django at a glance Design your model Install it Enjoy the free API A dynamic admin interface: it’s not just scaffolding – it’s the whole house Design your Writing your first Django app, part 2 Database setup Creating models Activating models Playing with the API Introducing the Django Admin Writing your first Django app, part 3 Overview Writing more views Write Multiple databases Tablespaces Database access optimization Database instrumentation Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads0 码力 | 2790 页 | 2.71 MB | 1 年前3
Django CMS 3.8.x Documentationtake a basic Django opinion poll application and integrate it into the CMS. 4.1. Create a plugin model In the models.py of polls_cms_integration add the following: from django.db import models from cms on_delete=models.CASCADE) def __str__(self): return self.poll.question This creates a plugin model class; these all inherit from the cms.models.pluginmodel.CMSPlugin base class. Note django CMS plugins pluginmodel.CMSPlugin (or a sub- class thereof) and not models.Model [https://docs.djangoproject.com/en/2.2/ref/models/instances/#django.db.models.Model]. Create and run migrations: python manage.py makemigrations0 码力 | 413 页 | 1.67 MB | 6 月前3
django cms 3.5.x Documentationmigrations.py tests.py views.py mysite/ static/ project.db requirements.txt The Plugin Model In your poll application’s models.py add the following: from django.db import models from cms.models and not models.Model [https://docs.djangoproject.com/en/1.10/ref/models/instances/#django.db.models.Model]. PollPluginModel might seem an odd choice for a model name (that is, with model in the name) but register_plugin # register the plugin class PollPluginPublisher(CMSPluginBase): model = PollPluginModel # model where plugin data are saved module = _("Polls") name = _("Poll Plugin") # name0 码力 | 403 页 | 1.69 MB | 1 年前3
共 648 条
- 1
- 2
- 3
- 4
- 5
- 6
- 65













