Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Inheriting all admin urls before attaching change_list for campaigns

  • Loading branch information...
commit a8bfef1581ce43a2ea6f56a3707f14a611596148 1 parent 2265183
@JohnRandom authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 mailchimp/admin.py
View
9 mailchimp/admin.py
@@ -5,6 +5,7 @@
class MailchimpAdmin(admin.ModelAdmin):
def get_urls(self):
+ patterns = super(MailchimpAdmin, self).get_urls()
from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('',
url(r'^$',
@@ -12,15 +13,15 @@ def get_urls(self):
name='mailchimp_campaign_changelist',
kwargs={'page':'1'}),
)
- return urlpatterns
-
+ return patterns + urlpatterns
+
def has_add_permission(self, request):
# disable the 'add' button
return False
-
+
def has_change_permission(self, request, obj=None):
return request.user.has_perm('mailchimp.can_view')
-
+
def has_delete_permission(self, request, obj=None):
return False
Please sign in to comment.
Something went wrong with that request. Please try again.