• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    CSS
  • License
    BSD 3-Clause "New...
  • Created about 12 years ago
  • Updated about 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Live object editing for django with jQuery UI and Bootsrap

django-editlive

Live form editing for django with Bootstrap and jQuery UI

Demo Official site
Documentation Read the Docs
Build server Travis ci BUILDSTATUS

Requirements

Basic usage

In a template, editlive can take any in context database object and make it editable live with a simple template tag:

{% load editlive_tags %}

{% editlive "object.description" as object_description %}
<div>
    {{ object_description }}
</div>

This will render the object's property value in a clickable container. When the container is clicked, it changes to a input field according to the field's type.

It's possible to apply template filters to the placeholder's display value like this:

{% editlive "object.description" template_filters="capfirst" as object_description %}

{% editlive "object.date_visit" template_filters="date:'l j M Y at H:i\h'" as date_visit %}

Most other arguments are converted into js options and fed to the jQuery UI widget.

Working with formsets

Formsets are a bit tricky since you need to edit multiple fields with the same id and name attributes.

So for this to work, the id and name attributes must be altered to make them unique. To achieve this, simply pass a formset argument to editlive and give it a meaningful name:

{% editlive "object.first_name" formset="user" as user_firstname %}
{{ user_firstname }}

The input field will then look like this:

<input type="text" maxlength="250" name="user_set-0-first_name" id="id_user_set-0-first_name" />

The magic

To avoid conflicting with other plugins or altering the input field directly, editlive use its own tag to bind the field properties and settings to the right input.

For example, if we were to editlive the first_name property of a user object, the output would look something like this:

<input type="text" maxlength="250" value="Bob" name="first_name" id="id_first_name" />
<editlive app-label="auth" module-name="user" field-name="first_name" data-field-id="id_first_name" data-type="textField" object-id="1" rendered-value="Bob" />

This way editlive stays non-intrusive as it doesn't alter the original input tag.

This also means that you are not constrained to use the editlive template tag, you can hardcode <editlive /> tag in HTML and the JavaScript will hook it up.

Credits

This project was created and is sponsored by:

http://motion-m.ca/media/img/logo.png

Motion Média (http://motion-m.ca)

More Repositories

1

django-pdfutils

PDF utils
Python
101
star
2

python-libvin

A fork/rewrite of vinlib: http://pypi.python.org/pypi/vinlib/ (https://github.com/lszyba1/vinlib)
Python
51
star
3

django-courier

Dead simple email notification system
Python
20
star
4

grappelli-fit

A Grappelli compatibility layer for popular Django apps
JavaScript
17
star
5

spec

Bash implementation of color spectrum for IP subneting
Shell
13
star
6

django-colorfield

Simple colorfield for django (optimized for grappelli)
JavaScript
12
star
7

python-dad

Python-dad which stands for Django Automated Deployment is a lightweight Python package which harness the power of virtualenv, pip and fabric to fully automate the development setup and deployment of django projects.
Python
11
star
8

django-seoutils

SEO utils
Python
10
star
9

django-duke-client

test client
Python
6
star
10

django-frontadmin

A django frontadmin ..
JavaScript
6
star
11

SCSS3

CSS3 boilerplate for SASS
6
star
12

django-webcore

Everything needed to build modern websites with Django
JavaScript
6
star
13

django-newsly

Simple drop-in news app for django
Python
5
star
14

django-company

A reusable django application for holding company website infos
Python
5
star
15

django-gallery

Simple gallery system for django
Python
4
star
16

django-slider

A django application to create and manage an image slider
Python
4
star
17

letsencrypt-namecheap-hook

Python
4
star
18

django-checkin

JavaScript
3
star
19

python-kolors

Simple and lightweight shell color output function.
Shell
3
star
20

django-hyperadmin-angularclient

Hyperadmin client written using angular.js
JavaScript
2
star
21

django-bootstrap-ui

Extra form fields for bootstrap
HTML
2
star
22

jquery.shadowdom.js

Experiment trying to emulate the encapsulation of the shadow DOM
JavaScript
2
star
23

django-idefix

JavaScript
2
star
24

django-nav

Quick simple navigation groupings (fork)
Python
2
star
25

bootstrapit

Bootstrap skin generator
JavaScript
2
star
26

django-qooxdoo

my little attempt to make qooxdoo play nice with Django
2
star
27

django-cablegate

Wikileaks cablegate viewer written in Django
JavaScript
2
star
28

python-dploy

Deployment utilities for fabric
Python
2
star
29

django-singularity

Web application framework that mixes Twitter Bootstrap & AngularJS
Python
1
star
30

django-duke-master

test
Python
1
star
31

python-tzu

To come .. maybe.
1
star
32

django-dploy-old

django-dploy (old)
Python
1
star
33

django-moris

Django-moris stands for latin mobilis oris which can be translated as "mobile sight"
JavaScript
1
star
34

django-duke

Test project
Python
1
star
35

django-project-template

My reusable django project template
Python
1
star
36

duke.deploy

A recipe for duke to deploy django projects
Python
1
star
37

django-affiliate

A simple application to manage affiliates
1
star
38

django-unsocial

Middleware to remove social site widgets while developing
Python
1
star
39

django-sitewidgets

Reusable site widgets
Python
1
star
40

grappelli-easythumbnails

Easy thumbnail integration / extension for grappelli
Python
1
star
41

duke-website

Duke test website
Python
1
star
42

string.format.js

JavaScript Advanced String Formatting à la Python
JavaScript
1
star
43

django-awa

Django Apps Widget API (experimental)
1
star
44

siteconfs

Something that is most likely useful only to me
JavaScript
1
star
45

django-grappelli3

Test project with grappelli 2.4 using bootstrap as UI
JavaScript
1
star
46

python-vinapi

python-vinapi
Python
1
star
47

django-inplaceeditform

Django Edit inlive frontend
JavaScript
1
star