Skip to main content

Add inline editble fields to your templates

Project description

# django-inlineedit

Inline editing for Django models

## Installation

  1. Use pip to install the latest stable release

    pip install django-inlineedit

    OR

    Run the following command inside the top-level cloned repository:

    ‘easy_install .’

  2. Add inlineedit to INSTALLED_APPS in the project settings (see dependencies below)

  3. Add path(<url for form submission>, include(‘inlineedit.urls’)) to the base URLs

    django-inlineedit will use any URL you specify, make sure it does not conflict with existing URLs in your app!

## Quickstart

In your templates add the django-inlineedit JS in a suitable location (for example at the bottom of the template <body>):

{% load inlineedit_default_script %} {% inlineedit_default_script %}

Then load the template tags with:

{% load inlineedit %}

to add inline editing to a field, you use the inlineedit template tag. For example:

{% inlineedit “my_object.my_field” %}

This will add the HTML and JS necessary to edit my_field in object my_object. without any further configuration, the tag will display the field and show the editing link when the mouse hover over the field. A single click will open up an editing element and accept/reject buttons. Click the former to accept any changes and the latter to cancel those.

## Dependencies:

Required jquery 3.3.1 or higher installed.

### Support for integration with other libraries (optional)

  1. django-reversions

    No configuration is needed, django-inlineedit will simply use django-reversion as long as your models are decorated with @reversion.register()

  2. Django-CKEditor

    Version 5.9.0 or higher is required for the CKEditor adaptor to work. for example:

    {% inlineedit “my_object.my_field” “ckeditor” %}

    Or

    {% inlineedit “my_object.my_field” “ckeditor” “toolbar” %}

  1. Markdown

    The Python library Markdown is required for the adaptor to work

    {% inlineedit “my_object.my_field” “markdown” %}

## Running examples

  1. cd into the root directory of the example you want to run (under the examples folder)

  2. run python3 manage.py migrate to setup a local sqlite3 database.

  3. run python3 manage.py runserver to start a local development server for the example.

## Open source licenses

This product depends on the following software and media packages

Bootstrap version 4.0 is licensed under the [MIT License](http://opensource.org/licenses/mit-license.html)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-inlineedit-1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_inlineedit-1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file django-inlineedit-1.0.tar.gz.

File metadata

  • Download URL: django-inlineedit-1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.3.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4

File hashes

Hashes for django-inlineedit-1.0.tar.gz
Algorithm Hash digest
SHA256 cfb253bd45f023e108ae879fa4810c2b9278af9a2dc50b37dea5bd533a61c406
MD5 ee9318fc41e817bfce19a0fa89795211
BLAKE2b-256 863773104f570eda7ca5e135547719adf50b82e27f1c20e34c826ec560f4c495

See more details on using hashes here.

File details

Details for the file django_inlineedit-1.0-py3-none-any.whl.

File metadata

  • Download URL: django_inlineedit-1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.3.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4

File hashes

Hashes for django_inlineedit-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fab1ff2349cc64b658cf499f60ccec80c2853dd985d54bbb7d9ba370c4c456d
MD5 260abe8f35a8e98f0d2905e117f8ba93
BLAKE2b-256 f038e2646d5bd54707c80d05a8c5369a63fe3b49f5f0ca9f7ea08a91bbebbe5b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page