Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Inheriting all admin urls before attaching change_list for campaigns

  • Loading branch information...
commit a8bfef1581ce43a2ea6f56a3707f14a611596148 1 parent 2265183
Moritz Krog authored November 16, 2011

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. 9  mailchimp/admin.py
9  mailchimp/admin.py
@@ -5,6 +5,7 @@
5 5
 
6 6
 class MailchimpAdmin(admin.ModelAdmin):
7 7
     def get_urls(self):
  8
+        patterns = super(MailchimpAdmin, self).get_urls()
8 9
         from django.conf.urls.defaults import patterns, url
9 10
         urlpatterns = patterns('',
10 11
             url(r'^$',
@@ -12,15 +13,15 @@ def get_urls(self):
12 13
                 name='mailchimp_campaign_changelist',
13 14
                 kwargs={'page':'1'}),
14 15
         )
15  
-        return urlpatterns
16  
-    
  16
+        return patterns + urlpatterns
  17
+
17 18
     def has_add_permission(self, request):
18 19
         # disable the 'add' button
19 20
         return False
20  
-    
  21
+
21 22
     def has_change_permission(self, request, obj=None):
22 23
         return request.user.has_perm('mailchimp.can_view')
23  
-        
  24
+
24 25
     def has_delete_permission(self, request, obj=None):
25 26
         return False
26 27
 

0 notes on commit a8bfef1

Please sign in to comment.
Something went wrong with that request. Please try again.