Hacker News new | comments | show | ask | jobs | submit login
Django-inplaceedit: Edit on the fly (python.org)
88 points by pajju 1635 days ago | hide | past | web | 22 comments | favorite

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

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.

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.

Thanks. I'll watch. I'm utterly ambivalent about which license(s) to use for my open source projects. I'm happy to follow the consensus.

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?

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.

If you enable the toolbar: https://github.com/Yaco-Sistemas/django-inplaceedit#install-...

You have a button to enable/disable the inplace editing. When this is enabled every thing that you can inplaceedit are indicated. So you don't have to scan the page

Please use the application

I prefer a cluttered page that the users know how to use, to a clean page they don't realize they can edit. I also wonder what the best practice is here. The shown solution is fine for internal tools, but not very good for a site designed to be intuitive to new users that will not have training.

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 %}
  <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.)

This might be an interesting backend for http://createjs.org/

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:


Best regards,

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.

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

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.

There is a section lower down on TFA that documents using a Permission-based test or a custom test. Over all, looks like I'll probably swap my hacked-together-from-jquery-plugin-and-ajax-api solution with this. Much cleaner for my code.

Permissions are apparently customizable https://github.com/Yaco-Sistemas/django-inplaceedit#overwrit...

That's true. Super!

It's for editing you own data on a site, I'd say. But every user must be a superuser then... I wonder if that presents some non-avoidable security issues in this case.

You can probably change permissions in either the plugin or jQuery such that any user can do this.

I would think `is_staff` makes more logical sense.

This is customizable, two examples:


If you think that is more logical sense with is_staff you can customize it very very easy

this looks sweet. gonna try it out.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact