GithubHelp home page GithubHelp logo

sinaso / django-mediumeditor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from g3rd/django-mediumeditor

0.0 1.0 0.0 9 KB

Adds MediumEditor (https://yabwe.github.io/medium-editor/) to Django.

License: MIT License

Python 52.01% CSS 7.11% JavaScript 40.89%

django-mediumeditor's Introduction

Django Medium Editor

Adds Medium Editor to Django.

Supported Environments

  • Django 1.9
  • Python 3.4

Installation

  1. Install django-mediumeditor

    via PyPi:

    pip install django-mediumeditor
    

    via GIT:

pip install git+https://github.com/g3rd/django-mediumeditor.git ```

  1. Install app
    INSTALLED_APPS = [
        ...
        'mediumeditor',
    ]
    

Usage

Django Admin

Add to Admin class

from mediumeditor.admin import MediumEditorAdmin

@admin.register(MyModel)
class MyModelAdmin(MediumEditorAdmin, admin.ModelAdmin):
    ...
    mediumeditor_fields = ('my_text_field', )
    ...

Forms

NOTE: This is untested

  1. Override the Widget for the field

    from mediumeditor.widgets import MediumEditorTextarea
    
    class MyForm(forms.ModelForm):
        ...
        class Meta:
            model = MyModel
            widgets = {
                'my_text_field': MediumEditorTextarea(),
            }
    
  2. In the <head> of the template

    {{ form.media }}
    

Contributing

Take out some bugs

Report issues or feature requests

License

MIT: https://github.com/g3rd/django-mediumeditor/blob/master/LICENSE

django-mediumeditor's People

Contributors

g3rd avatar bugov avatar

Watchers

Sina Sohangir avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.