Giter Club home page Giter Club logo

django-inplaceedit-extra-fields's Introduction

https://badge.fury.io/py/django-inplaceedit-extra-fields.png https://pypip.in/d/django-inplaceedit-extra-fields/badge.png

django-inplaceedit-extra-fields is a Django application that adds other useful fields to django-inplaceedit .

It is distributed under the terms of the GNU Lesser General Public License.

And other packages, depending on which fields you want to use (see below).

Video Demo, of django-inplaceedit, django-inplaceedit-extra-fields and django-inlinetrans (Set full screen mode to view it correctly)

https://github.com/Yaco-Sistemas/django-inplaceedit/raw/master/video-frame.png

After installing django-inplaceedit egg

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    #.....................#
    'inplaceeditform',
    'inplaceeditform_extra_fields',
)

If you want to overwrite the adaptors for all cases in your project:

ADAPTOR_INPLACEEDIT = {'textarea': 'inplaceeditform_extra_fields.fields.AdaptorTinyMCEField',
                       #'textarea': 'inplaceeditform_extra_fields.fields.AdaptorSimpleTinyMCEField',
                       'image': 'inplaceeditform_extra_fields.fields.AdaptorImageThumbnailField',
                       'fk': 'inplaceeditform_extra_fields.fields.AdaptorAutoCompleteForeingKeyField',
                       'm2mcomma': 'inplaceeditform_extra_fields.fields.AdaptorAutoCompleteManyToManyField'}

If you want, you can register these fields in your settings with different keys:

ADAPTOR_INPLACEEDIT = {'auto_fk': 'inplaceeditform_extra_fields.fields.AdaptorAutoCompleteForeingKeyField',
                       'auto_m2m': 'inplaceeditform_extra_fields.fields.AdaptorAutoCompleteManyToManyField',
                       'image_thumb': 'inplaceeditform_extra_fields.fields.AdaptorImageThumbnailField',
                       'tiny': 'inplaceeditform_extra_fields.fields.AdaptorTinyMCEField',
                       'tiny_simple': 'inplaceeditform_extra_fields.fields.AdaptorSimpleTinyMCEField'}

And after that, to want use a specific adaptor you can pass it to the templatetag, e.g.:

{% inplace_edit "content.field_name" adaptor="tiny" %}
  • They depend on the other eggs
  • They are a specific solution
  • These do not work immediately, you have to code them

These fields depend on django-ajax-selects (1.2.5). You have to create a channel (lookup)

{% inplace_edit "content.field_name" adaptor="auto_fk", lookup="my_lookup" %}

For more info, visit the doc of django-ajax-selects

It is recomended you overwrite the following templates:

This field depends on sorl-thumbnail (11.12). You just need to specify the thumb size.

{% inplace_edit "content.field_name" adaptor="image_thumb", size="16x16" %}

It can help you, configure in your settings:

THUMBNAIL_DEBUG = True

For more info, visit the doc of sorl-thumbnail

{% inplace_edit "content.field_name" adaptor="tiny" %}
or
{% inplace_edit "content.field_name" adaptor="tiny_simple" %}

Note

We use tinyMCE 4.0 without changes (from django-inplaceedit-extra-fields==0.3.0), if you want to use another version (4.X) of tinyMCE set INPLACE_TINYMCE_JS in your settings.

INPLACE_TINYMCE_JS = '/my/path/of/tinyMCE'

If you want to use a tinyMCE 3.X, please use django-inplaceedit-extra-fields==0.2.4

You can test it with the testing project of django-inplaceedit or with the testing project of django-inplaceedit-bootstrap

You can get the leading edge version of django-inplaceedit-extra-fields by doing a clone of its repository:

git clone [email protected]:goinnn/django-inplaceedit-extra-fields.git

django-inplaceedit-extra-fields's People

Contributors

fcurella avatar goinnn avatar shamcode avatar yuego avatar

Watchers

 avatar  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.