jrief / django-admin-sortable2

Generic drag-and-drop ordering for objects in the Django admin interface
https://django-admin-sortable2.readthedocs.io/en/latest/
Other
771 stars 180 forks source link

drag png / div doesn't render to be able to sort with #117

Open th1s9uy opened 8 years ago

th1s9uy commented 8 years ago

I have an app that fails to render the Sort div/cell for me to click and drag.
project settings init: `INSTALLED_APPS = [

'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'adminsortable2',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'rest_framework',
'rest_framework.authtoken',
'widget_tweaks',
'dataninja',

'report_scheduler',
'etl',
'rl_automator',

]` And the page rendering of the html: render.txt

image

Using the very basic example below: `class SortableBook(models.Model): title = models.CharField('Title', null=True, blank=True, max_length=255) my_order = models.PositiveIntegerField(default=0, blank=False, null=False)

class Meta(object):
    ordering = ('my_order',)`

Admin snippet: `import traceback

from django.contrib import admin, messages from django import forms from django.contrib import messages

from report_scheduler.forms import ClientAdminForm from report_scheduler.models import Client, ReportSchedule, ReportDefinition, ReportSet, \ AggregationDefinition, ReportFilter, ReportCriteria, ReportCriteriaSort, HistoryReport, SortableBook

from etl.models import CalendarDay from adminsortable2.admin import SortableAdminMixin,SortableInlineAdminMixin class MyModelAdmin(SortableAdminMixin, admin.ModelAdmin): pass admin.site.register(SortableBook, MyModelAdmin)`

I have many other models and admin forms also, no naming conflicts though.

jrief commented 8 years ago

The css requires a small png image, which is used to symbolize a draggable area. It seems as if it is not loaded.