Django CMS 3.9.x Documentation
it. In the polls_cms_integration application, add a forms.py file: from django import forms from polls.models import Poll class PollWizardForm(forms.ModelForm): class Meta: model = Poll wizard_base import Wizard from cms.wizards.wizard_pool import wizard_pool from polls_cms_integration.forms import PollWizardForm class PollWizard(Wizard): pass poll_wizard = PollWizard( title="Poll" access in the child you can access the parent instance using get_bound_plugin: class ChildPluginForm(forms.ModelForm): class Meta: model = ChildPlugin exclude = () def __init__(self0 码力 | 417 页 | 1.68 MB | 6 月前3Django CMS 3.8.x Documentation
it. In the polls_cms_integration application, add a forms.py file: from django import forms from polls.models import Poll class PollWizardForm(forms.ModelForm): class Meta: model = Poll wizard_base import Wizard from cms.wizards.wizard_pool import wizard_pool from polls_cms_integration.forms import PollWizardForm class PollWizard(Wizard): pass poll_wizard = PollWizard( title="Poll" access in the child you can access the parent instance using get_bound_plugin: class ChildPluginForm(forms.ModelForm): class Meta: model = ChildPlugin exclude = () def __init__(self0 码力 | 413 页 | 1.67 MB | 6 月前3Django CMS 4.1.x Documentation
creating Pages, but you can add your own models to it. In the polls_cms_integration application, add a forms.py file: Then add a cms_wizards.py file, containing: Refresh the Polls page, hit the Create button offering you a new wizard for creating Polls. Note from django import forms from polls.models import Poll class PollWizardForm(forms.ModelForm): class Meta: model = Poll exclude = [] wizard_base import Wizard from cms.wizards.wizard_pool import wizard_pool from polls_cms_integration.forms import PollWizardForm class PollWizard(Wizard): pass poll_wizard = PollWizard( title="Poll"0 码力 | 518 页 | 1.66 MB | 6 月前3Django CMS 3.11.10 Documentation
creating Pages, but you can add your own models to it. In the polls_cms_integration application, add a forms.py file: Then add a cms_wizards.py file, containing: Refresh the Polls page, hit the Create button offering you a new wizard for creating Polls. Note from django import forms from polls.models import Poll class PollWizardForm(forms.ModelForm): class Meta: model = Poll exclude = [] wizard_base import Wizard from cms.wizards.wizard_pool import wizard_pool from polls_cms_integration.forms import PollWizardForm class PollWizard(Wizard): pass poll_wizard = PollWizard( title="Poll"0 码力 | 493 页 | 1.44 MB | 6 月前0.03Django CMS 4.0.x Documentation
you can add your own models to it. In the polls_cms_integration application, add a forms.py file: from django import forms from polls.models import Poll (continues on next page) 26 Chapter 4. Software version notes django cms Documentation, Release 3.9.0 (continued from previous page) class PollWizardForm(forms.ModelForm): class Meta: model = Poll exclude = [] Then add a cms_wizards.py file, containing: from wizard_base import Wizard from cms.wizards.wizard_pool import wizard_pool from polls_cms_integration.forms import PollWizardForm class PollWizard(Wizard): pass poll_wizard = PollWizard( title="Poll", weight=2000 码力 | 296 页 | 1.79 MB | 6 月前3Django CMS 3.9.x Documentation
it. In the polls_cms_integration application, add a forms.py file: from django import forms from polls.models import Poll class PollWizardForm(forms.ModelForm): class Meta: model = Poll exclude = [] Then wizard_base import Wizard from cms.wizards.wizard_pool import wizard_pool from polls_cms_integration.forms import PollWizardForm class PollWizard(Wizard): pass poll_wizard = PollWizard( title="Poll", weight=200 access in the child you can access the parent instance using get_bound_plugin: class ChildPluginForm(forms.ModelForm): class Meta: model = ChildPlugin exclude = () def __init__(self, *args, **kwargs): super()0 码力 | 298 页 | 1.79 MB | 6 月前3Better Code: Exploring Validity
Rights Reserved. Substance can take on many forms struct P { int32_t x; int32_t y; };© 2023 Adobe. All Rights Reserved. Substance can take on many forms struct P { int32_t x; int32_t y; }; x=3, y=4© Rights Reserved. Substance can take on many forms struct P { int32_t x; int32_t y; }; x=0, y=1© 2023 Adobe. All Rights Reserved. Substance can take on many forms struct P { int32_t x; int32_t y; };© 2023 Rights Reserved.© 2023 Adobe. All Rights Reserved.© 2023 Adobe. All Rights Reserved. Valid Forms Invalid Forms© 2023 Adobe. All Rights Reserved.© 2023 Adobe. All Rights Reserved. unique_ptrp = make_unique ( 0 码力 | 117 页 | 6.03 MB | 5 月前3Django CMS 3.0.x Documentation
Note that creating the admin hook is still required, because it creates the add and change admin forms that are required for the next step. Adding a Toolbar Menu Item for your Page extension You’ll also CMS_PERMISSION is True The view restrictions and page permissions inlines on the cms.models.Page admin change forms can cause performance problems where there are many thousands of users being put into simple select field to the cms.models.pagemodel.Page model that defaults to the cms.forms.fields.PageSelectFormField form field when rendered in forms. It has the same API as the django.db.models.fields.related.ForeignKey0 码力 | 180 页 | 1.56 MB | 6 月前3Django CMS 2.4.x Documentation
pollute the global JavaScript namespace. Plugin cancel button fixed The cancel button in plugin change forms no longer saves the changes, but actually cancels. Tests refactor Tests can now be run using setup is True The “view restrictions” and “page permissions” inlines on the cms.models.Page admin change forms can cause performance problems where there are many thousands of users being put into simple select field to the cms.models.pagemodel.Page model that defaults to the cms.forms.fields.PageSelectFormField form field when rendered in forms. It has the same API as the django.db.models.fields.related.ForeignKey0 码力 | 104 页 | 709.98 KB | 6 月前3Django CMS 2.3.x Documentation
pollute the global JavaScript namespace. Plugin cancel button fixed The cancel button in plugin change forms no longer saves the changes, but actually cancels. Tests refactor Tests can now be run using setup field to the cms.models.pagemodel.Page model that defaults to the cms.forms.fields.PageSelectFormField form field when rendered in forms. It has the same API as the django.db.models.fields.related.ForeignKey does not require the othermodel argument. 4.7.2 Form fields class cms.forms.fields.PageSelectFormField Behaves like a django.forms.models.ModelChoiceField field for the cms.models.pagemodel.Page model0 码力 | 92 页 | 666.41 KB | 6 月前3
共 108 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11