Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(0)  |  Derive(14)  |  Import(2)

src/d/j/django-cached-modelforms-HEAD/cached_modelforms/tests/test_forms.py   django-cached-modelforms(Download)
from django.db.models import CharField
 
from cached_modelforms import (ModelForm, CachedModelChoiceField,
                               CachedModelMultipleChoiceField)
from cached_modelforms.tests.utils import SettingsTestCase
        class ModelFormSingle(ModelForm):
            class Meta:
                model = ModelWithForeignKey
                objects = {'fk_field': self.get_objects}
 
        class ModelFormSingleWithoutObjects(ModelForm):
            class Meta:
                model = ModelWithForeignKey
 
        class ModelFormSingleWithFormfieldCallback(ModelForm):
        class ModelFormMultiple(ModelForm):
            class Meta:
                model = ModelWithM2m
                objects = {'m2m_field': self.get_objects}
 

src/d/j/django-cached-modelforms-0.2.1/cached_modelforms/tests/test_forms.py   django-cached-modelforms(Download)
from django.db.models import CharField
 
from cached_modelforms import (ModelForm, CachedModelChoiceField,
                               CachedModelMultipleChoiceField)
from cached_modelforms.tests.utils import SettingsTestCase
        class ModelFormSingle(ModelForm):
            class Meta:
                model = ModelWithForeignKey
                objects = {'fk_field': self.get_objects}
 
        class ModelFormSingleWithoutObjects(ModelForm):
            class Meta:
                model = ModelWithForeignKey
 
        class ModelFormSingleWithFormfieldCallback(ModelForm):
        class ModelFormMultiple(ModelForm):
            class Meta:
                model = ModelWithM2m
                objects = {'m2m_field': self.get_objects}