Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NestedTabularInline drag-and-drop? #97

Closed
globophobe opened this issue Apr 24, 2018 · 6 comments
Closed

NestedTabularInline drag-and-drop? #97

globophobe opened this issue Apr 24, 2018 · 6 comments

Comments

@globophobe
Copy link

Thanks for the great library! NestedStackedInline drag-and-drop works great.

NestedTabularInline drag-and-drop doesn't seem to work. The first level is fine. However, subsequent levels of nesting don't respond.

@fdintino
Copy link
Member

Hmm. We have extensive unit tests for drag-and-drop on NestedTabularInline, and those run on all django versions from 1.8 to 2.0. Is there anything unusual about your django admin setup? Additional admin extensions, ModelAdmin class mixins, or custom templates?

@globophobe
Copy link
Author

I disabled everything possible to see if there was a conflict. There are no custom templates. Django==2.0.4

However, I have a base class:

class TabularBase(nested_admin.NestedTabularInline):
    sortable_field_name = 'order'
    extra = 0

The problem seems to be with extra = 0. When extra = 1 (or greater), drag-and-drop works normally.

@fdintino
Copy link
Member

fdintino commented Apr 26, 2018

@globophobe can you check if the dj20-fix-tabular-inlines branch fixes your issue?

@globophobe
Copy link
Author

There was no change. There were no errors in the javascript console.

I tried a few browsers, and cleared the cache. I had cloned the branch, and installed with "python setup.py develop"

pip freeze:

-e git+https://github.com/theatlantic/django-nested-admin.git@3a75b938ca0b802c180df822d2cdc5e58b321aa1#egg=django_nested_admin

I looked at 58b4c98

However, I'm not familiar with the code base.

Maybe, I'll look more on the weekend.

@fdintino
Copy link
Member

fdintino commented May 4, 2018

@globophobe did you ever get to the bottom of this?

@globophobe
Copy link
Author

Sorry, not yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants