Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

advice from iambrandontaylor/django-admin-sortable#24

  • Loading branch information...
commit 2a228ce683e7995d43829995b8bb06ddd6a74222 1 parent dd28652
@evildmp authored
View
3  links/cms_plugins.py
@@ -60,6 +60,7 @@ class Meta:
from adminsortable.admin import SortableStackedInline
class PluginInlineLink(SortableStackedInline):
+# class PluginInlineLink(admin.StackedInline):
extra=10
model = GenericLinkListPluginItem
form = PluginLinkInlineForm
@@ -83,7 +84,7 @@ class LinksPlugin(CMSPluginBase):
name = "Link(s)"
render_template = "links/cms_plugins/links.html"
text_enabled = True
-
+ change_form_template = "admin/links/plugin_change_form.html"
raw_id_fields = ('image',)
fieldsets = (
(None, {
View
8 links/templates/admin/links/plugin_change_form.html
@@ -0,0 +1,8 @@
+{% extends "admin/cms/page/plugin_change_form.html" %}
+{% block extrahead %}
+{{ block.super }}
+<script type="text/javascript" src="{{ STATIC_URL }}adminsortable/js/admin.sortable.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}adminsortable/js/jquery.effects.core.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}adminsortable/js/admin.sortable.stacked.inlines.js"></script>
+{% endblock %}
+
Please sign in to comment.
Something went wrong with that request. Please try again.