Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/orderable/admin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import posixpath
from django import forms
from django.contrib import admin

from orderable.settings import JQUERY_URL, JQUERYUI_URL, ORDERABLE_MEDIA_URL
from orderable.settings import JQUERY_URL, JQUERYUI_URL
from django.conf import settings

class OrderableAdmin(admin.ModelAdmin):
exclude = ('order',)
Expand All @@ -13,7 +13,7 @@ class OrderableAdmin(admin.ModelAdmin):

class Media:
js = (JQUERY_URL, JQUERYUI_URL,
posixpath.join(ORDERABLE_MEDIA_URL, 'orderable/orderable.js'))
posixpath.join(settings.STATIC_URL, 'orderable/orderable.js'))

def __init__(self, *args, **kwargs):
super(OrderableAdmin, self).__init__(*args, **kwargs)
Expand All @@ -28,7 +28,7 @@ class OrderableInline(object):

class Media:
js = (JQUERY_URL, JQUERYUI_URL,
posixpath.join(ORDERABLE_MEDIA_URL, 'orderable/orderable.js'))
posixpath.join(settings.STATIC_URL, 'orderable/orderable.js'))

class OrderableStackedInline(OrderableInline, admin.StackedInline):
template = 'orderable/edit_inline/stacked.html'
Expand Down
3 changes: 0 additions & 3 deletions src/orderable/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ def is_valid(url):

if not is_valid(JQUERYUI_URL):
JQUERYUI_URL = posixpath.join(settings.MEDIA_URL, JQUERYUI_URL)

ORDERABLE_MEDIA_URL = getattr(settings, 'ORDERABLE_MEDIA_URL',
settings.MEDIA_URL)