Skip to content

Instantly share code, notes, and snippets.

@nskeip
Created May 31, 2012 12:14
Show Gist options
  • Save nskeip/2843011 to your computer and use it in GitHub Desktop.
Save nskeip/2843011 to your computer and use it in GitHub Desktop.
Registering any_model extension for tinymce's HTMLField
import tinymce
from django_any import xunit
from django_any.models import any_model, any_field
@any_field.register(tinymce.models.HTMLField)
def any_tinymce_html_field(*_):
return xunit.any_string(min_length=1, max_length=400)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment