import admin_notifications

from models import Link

# a global variable, showing whether linkcheck is still working
still_updating = False

def notification():
    if still_updating:
        return "Still checking. Please refresh this page in a short while. "
    else:
        broken_links = Link.objects.filter(ignore=False, url__status=False).count()
        if broken_links:
            return "You have %s broken link%s.<br>You can view or fix them using the <a href='/admin/linkcheck/'>Link Manager</a>." % (broken_links, "s" if broken_links>1 else "")
        else:
            return ''

admin_notifications.register(notification)
@@ -1,12 +1,21 @@
+try:%0A    
 import admin
@@ -28,16 +28,107 @@
 ications
+%0A    has_admin_notifications = True%0Aexcept ImportError:%0A    has_admin_notifications = False
 %0A%0Afrom m
@@ -625,15 +625,8 @@
 nks,
- %22s%22 if
  bro
@@ -637,20 +637,26 @@
 links%3E1 
-else
+and %22s%22 or
  %22%22)%0A   
@@ -689,16 +689,48 @@
 urn ''%0A%0A
+if has_admin_notifications:%0A    
 admin_no
@@ -763,8 +763,9 @@
 ication)
+%0A

Make admin_notifications really optional