django-pagedownA Django app that allows the easy addition of Stack Overflow's 'PageDown' markdown edito... | |
Download |
django-pagedown Ranking & Summary
Advertisement
- License:
- BSD License
- Price:
- FREE
- Publisher Name:
- Timmy O'Mahony
- Publisher web site:
- https://github.com/timmyomahony/
django-pagedown Tags
django-pagedown Description
django-pagedown Django app that allows the easy addition of Stack Overflow's "Pagedown" Markdown editor to a Django form field, whether in a custom app or the Django Admin.Installation- Install via pip: `pip install -e https://timmyomahony@github.com/timmyomahony/django-pagedown.git#egg=django-pagedown`- Add `pagedown` to your `INSTALLED_APPS`Note that this package will install a cloned copy of the Pagedown library from http://github.com/timmyomahony/pagedown/.UsageIf you want to use the pagedown editor in a django admin field, there are numerous possible approaches:To use it in **all** `TextField`'s in you admin form: from pagedown.widgets import AdminPageDownWidget class FooModelAdmin(models.ModelAdmin): formfield_overrides = { models.TextField: {'widget': AdminPageDownWidget }, }Alternatively, to only use it on particular fields, first create a form (in `forms.py`): from pagedown.widgets import AdminPageDownWidget class FooModelForm(forms.ModelForm): a_text_field = forms.TextField(widget=AdminPageDownWidget()) another_text_field = forms.TextField(widget=AdminPageDownWidget()) class Meta: model = FooModeland in your `admin.py`: from forms import FooModelForm class FooModelAdmin(models.ModelAdmin): form = FooModelFormProduct's homepage
django-pagedown Related Software