Permalink
Browse files

Add django-smugler app for JSON data import / export in admin pages

  • Loading branch information...
1 parent b7dd92e commit 3eec12c6c22f7d728195a287dc09fb6a093086b0 @lmorchard lmorchard committed Feb 9, 2011
Showing with 8 additions and 2 deletions.
  1. +4 −2 apps/homesnippets/admin.py
  2. +2 −0 requirements/base.txt
  3. +1 −0 settings.py
  4. +1 −0 urls.py
@@ -3,22 +3,24 @@
from homesnippets.models import Snippet, ClientMatchRule
class ClientMatchRuleAdmin(admin.ModelAdmin):
+ change_list_template = 'smuggler/change_list.html'
pass
admin.site.register(ClientMatchRule, ClientMatchRuleAdmin)
class SnippetAdmin(admin.ModelAdmin):
+ change_list_template = 'smuggler/change_list.html'
fields = (
'name', 'body',
'client_match_rules',
'preview', 'disabled',
'priority', 'pub_start', 'pub_end',
- )
+ )
list_display = (
'name',
'preview', 'disabled',
'priority', 'pub_start', 'pub_end',
'modified'
- )
+ )
admin.site.register(Snippet, SnippetAdmin)
View
@@ -1,3 +1,5 @@
# Base project package requirements
Django==1.2.3
+
+-e git://github.com/semente/django-smuggler.git#egg=django-smuggler
View
@@ -114,6 +114,7 @@
'django.contrib.messages',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
+ 'smuggler',
'homesnippets',
)
View
@@ -8,6 +8,7 @@
handler404 = 'homesnippets.views.handler404'
urlpatterns = patterns('',
+ (r'^admin/', include('smuggler.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^', include('homesnippets.urls')),
)

0 comments on commit 3eec12c

Please sign in to comment.