Skip to content

Commit

Permalink
Remove static() from widgets class Media
Browse files Browse the repository at this point in the history
  • Loading branch information
darklow committed Sep 1, 2016
1 parent 52bf6bd commit 7c9d16b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions suit/sortables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from django.contrib import admin
from django.contrib.admin.views.main import ChangeList
from django.contrib.contenttypes.admin import GenericTabularInline, GenericStackedInline
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.forms import ModelForm, NumberInput
from django.db import models

Expand All @@ -14,7 +13,7 @@ class SortableModelAdminBase(object):
sortable = 'order'

class Media:
js = (static('suit/js/suit.sortables.js'),)
js = ('suit/js/suit.sortables.js',)


class SortableListForm(ModelForm):
Expand Down
3 changes: 1 addition & 2 deletions suit/widgets.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django import forms
from django.forms import Textarea, ClearableFileInput
from django.utils.safestring import mark_safe
from django.contrib.staticfiles.templatetags.staticfiles import static


class AutosizedTextarea(Textarea):
Expand All @@ -15,7 +14,7 @@ def __init__(self, attrs=None):

@property
def media(self):
return forms.Media(js=[static("suit/js/autosize.min.js")])
return forms.Media(js=('suit/js/autosize.min.js',))

def render(self, name, value, attrs=None):
output = super(AutosizedTextarea, self).render(name, value, attrs)
Expand Down

0 comments on commit 7c9d16b

Please sign in to comment.