Anonymous avatar Anonymous committed f184927

minor cleanup

Comments (0)

Files changed (1)

model_utils/models.py

 def add_status_query_managers(sender, **kwargs):
     """
     Add a Querymanager for each status item dynamically.
+
     """
     if not issubclass(sender, StatusModel):
         return
 
 def add_timeframed_query_manager(sender, **kwargs):
     """
-    Addds a QueryManager for a specific timeframe
+    Add a QueryManager for a specific timeframe.
+
     """
     if not issubclass(sender, TimeFramedModel):
         return
     try:
         sender._meta.get_field('timeframed')
-        raise ValueError("Model '%s' has a field named 'timeframed' which "
-                         "conflicts with the TimeFramedModel manager." % sender.__name__)
+        raise ImproperlyConfigured("Model '%s' has a field named "
+                                   "'timeframed' which conflicts with "
+                                   "the TimeFramedModel manager." 
+                                   % sender.__name__)
     except FieldDoesNotExist:
         pass
     sender.add_to_class('timeframed', QueryManager(
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.