Here are the examples of the python api django.contrib taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: django-markupfield Source File: tests.py
def test_model_admin_field(self):
# borrows from regressiontests/admin_widgets/tests.py
from django.contrib import admin
ma = admin.ModelAdmin(Post, admin.site)
self.assertTrue(isinstance(ma.formfield_for_dbfield(
Post._meta.get_field('body'), request=None).widget,
AdminMarkupTextareaWidget,
))