Coder Social home page Coder Social logo

django-treewidget's People

Contributors

jerch avatar leonh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-treewidget's Issues

Django 3.2 admin dark mode

Hey netzkolchose,

can you say something about the state of dark mode support?
it seems you've already, at least, started with this and there are CSS files for dark mode, but somehow it's not getting used.

Would you consider to support this and update your package?

Thx so far, really cool widget, I'm using it in a playground prototype kind of thing with django-treebeard.

Horizontal scroll for large content

I have a graphical issue when using tree widget: it overrides the maximum width allowed.

Here:
image

Could we find a trick to avoid that? A horizon scrollbar? A tooltip on hover? Both?

Thanks.

Django 3.0 compatibility

Hi there,
Would it be possible to support Django 3.0?
The only issue so far seems to be that django.utils.encoding.python_2_unicode_compatible was dropped. I could be replaced by the same functionality in the six package of python 2 compatibility could be dropped.

Initial value behavior is wierd

Sometimes, when passing initial value to form, the selected element acts wierd and display the wrong selected element (whereas the internal selected value is right!) and sometimes the widget displays 2 selected item even if only one can be selected.

initial = 3 (good display)
image

initial = 14 (wrong display)
image
should be
image

<select name="parent" class="form-control custom-select" id="id_parent">
  <option value="">---------</option>
  <option value="14">collecte de données clients</option>
  <option value="15" selected>enregistrement audio</option>
  <option value="16">enregistrement video</option>
  <option value="4">collecte de données salariés</option>
  <option value="6">collecte format numérique</option>
  <option value="10">disque partagé</option>
  <option value="5">collecte format papier</option>
  <option value="1">opération de communication</option>
  <option value="2">emailing</option>
  <option value="3">newsletter</option>
  <option value="11">scoring client</option>
  <option value="12">scoring de carte bancaire</option>
  <option value="13">scoring de crédit</option>
  <option value="7">stockage de données salariés</option>
  <option value="9">stockage format numérique</option>
  <option value="8">stockage format papier</option>
</select>

Database optimization

I've got a tree like this:
image

And my queries log for rendering this small tree is pretty huge:
image

Is there a way to improve database hit performances with some prefetch/select_related and where? Does it pass through monkey patching or there is another way to do so?

In order to seek a solution to this problem, I detected an issue with the tree rebuilding in treewidget/fields.py:52 method get_drawable_queryset where collecting disabled/selected IDs. I don't know where it can be useful but remove it improves significantly the database performances.

Thanks for any enlightenment.

better tree update view permissions story

Currently the tree update view actions are hardcoded to @login_required, which might be unwanted in certain cases. This needs some thinking, how to make this customizable from the default permissions system.

An easy straight forward fix might be to clamp the extended tree view permissions to the same (write) permissions as the admin.ModelAdmin classes. On a first glance this seems to be the right fix, as it keeps those views under write permissions, where they semantically belong to.
A more involved change would be to establish additional permissions for those actions.

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.