Browse Source

Improved docs for usage

David Cramer 15 years ago
parent
commit
0ff62b9a2f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      README.rst

+ 3 - 2
README.rst

@@ -97,7 +97,8 @@ If you wish to access these within your own views and models, you may do so via
 
 	from djangodblog.models import Error, ErrorBatch
 	
-	ErrorBatch.objects.all().order_by('-last_seen')
+	# Pull the last 10 unresolved errors.
+	ErrorBatch.objects.filter(status=0).order_by('-last_seen')[0:10]
 
 You can also record errors outside of middleware if you want::
 
@@ -108,7 +109,7 @@ You can also record errors outside of middleware if you want::
 	except Exception, exc:
 		Error.objects.create_from_exception(exc, [url=None])
 
-If you wish to log normal messages:
+If you wish to log normal messages (useful for ``logging`` integration):
 
 	from djangodblog.models import Error
 	import logging