
Django-inplaceedit: Edit on the fly - pajju
https://pypi.python.org/pypi/django-inplaceedit
======
ipmb
The Django ecosystem is almost entirely made up of BSD/MIT licensed software.
My guess is that licensing this as LGPL is going to hurt its adoption.

Jacob Kaplan-Moss has a good talk on licensing here,
<http://www.youtube.com/watch?v=vhuF0oalOi8>

~~~
mixmastamyk
TL;DR "The GPL is not appropriate for Django Apps. ...our community doesn't
use it. If your code isn't 'bsd mit lgpl apache mpl' I can't use it."

That's a statement with considerable consequences. I wish he'd spent more than
1.5 seconds on the explanation. I tend to like both the gpl and django.

~~~
ra
I am not a lawyer.

IIUC GPL is fine unless you want to make something that 'links to' the GPL
licensed code, then the code you made has to be GPL as well.

The way I understand that is if, in your python app, you 'import
gpl_licensed_lib' ... then you are boud by GPL to redistribute your source
under GPL.

That would be OK, if you were permitted to sell GPL based software without
giving away the source under GPL, which you are not.

TLDR: GPL is infectious, which is great for protecting GNU software like
Linux, but it also makes it complicated for people to build and sell
commercial software on Linux.

I build Django apps for clients, and I avoid any python library that's GPL
only.

------
danellis
I've implemented this kind of thing in Django before, and I found that the
problem I have with inline editing in general is one of affordance. Like the
example in the video, if there are no controls, you have to be already
familiar with the site to know that text is editable. 'Hover-over' affordance
isn't really acceptable, because you won't move your mouse there unless you
already have a reason to, and a user shouldn't be required to 'scan' the page
with the mouse to find out which bits are reactive.

On the other hand, having "edit" links or buttons next to every field really
litters up the page.

Has anybody written about good solutions to this?

~~~
daGrevis
We gone even further.

By pressing <C-q>, click events are disabled (all except for clicking on
translatable string) and all places, that are editable, are highlighted. By
clicking on them, a popup opens. Then you can edit and press save. It's saved
in the database. You can edit anything that uses `inline_trans` template tag.
If text is translated, the newest version is shown instead from database.
Sadly, it doesn't support variables yet. There is a page that shows all
translations that can't be translated like that. For example, string that
contain variables or strings that aren't in templates. It get those strings by
using `polib`. Then there is a script that parses templates and gets all
strings that are marked as "inline translatable". The same way `maketrans`
does it. Then there is a script that merges results from database with
existing PO file. It's done because taking strings from database is kinda slow
and it's done using GNU's `gettext`. Yes, you need Linux server to use it. :)

After having to maintain it for a few months, I can surely say that it was a
terrible idea. We aren't a CMS too and it wasn't a must-have feature! It was
done only for making life of business a little easier. Saying that, it would
be a lot easier to teach business to use something like Django Rosetta.

------
gojomo
Neat! It might be interesting to have a tag for 'replace-with-edited-text-if-
available'. (This falls somewhere between the editable-model-fields and
alternate-translations cases.) For example:

    
    
      {% replaceable %}
      <h1>Hello</h1>
      <p>This text might not appear, <i>if</i> it 
      is ever edited-in-place.</p>
      {% endreplaceable %}
    

When edited, the module would derive a deterministic unique key for the
modified HTML and store in the database. Future redisplays would use the
edited text. (Optional parameters might help control how the unique key is
derived, from either actual access URI or template name, to affect the range
of pages over which one edited-replacement-text appears.)

------
bergie
This might be an interesting backend for <http://createjs.org/>

------
goinnn
Hi all,

I am the main developer to django-inplaceedit.

I encourage you to collaborate with this egg, the last releases have been
thanks to the community, and for me this is very nice:

[https://github.com/Yaco-Sistemas/django-
inplaceedit/blob/mas...](https://github.com/Yaco-Sistemas/django-
inplaceedit/blob/master/CHANGES.rst)

Best regards,

------
coldtea
Nice for those who like it, but I never liked "edit on the fly" on a CMS.

Except if it was an additional method, for quick edits, corrections etc. Else,
it artificially restricts tons of stuff that could be done in a proper admin
interface.

------
iliaznk
So good, exactly what I need for my little hobby project. Thanks for sharing!

~~~
speg
Me too, but I'm a bit confused by:

    
    
      authenticated with a superuser
    

So is this primarily for editing your own site? I'm looking for something
where users can edit their own data.

~~~
raimondious
Permissions are apparently customizable [https://github.com/Yaco-
Sistemas/django-inplaceedit#overwrit...](https://github.com/Yaco-
Sistemas/django-inplaceedit#overwriting-the-default-permission-adaptor)

~~~
iliaznk
That's true. Super!

------
metaphorm
this looks sweet. gonna try it out.

