mirror of
https://github.com/jazzband/django-admin-sortable.git
synced 2026-03-16 22:10:30 +00:00
Fixed jQueryUI highlight method call in success handler of ajax function when dragging stops. Fixed missing script resource for jquery.effects.core.js
15 lines
No EOL
464 B
Python
Executable file
15 lines
No EOL
464 B
Python
Executable file
import os, os.path as osp
|
|
|
|
from django.conf import settings
|
|
from django.db.models import get_apps
|
|
|
|
def get_app_resource(app, path):
|
|
apps = get_apps()
|
|
for x in apps:
|
|
app_dir = osp.dirname(x.__file__)
|
|
if app == x.__name__.split('.')[-2]:
|
|
resource_dir = osp.join(app_dir, "resources")
|
|
asset = osp.join(resource_dir, path)
|
|
if osp.exists(asset):
|
|
return asset
|
|
continue |