Hello folks, I reported an issue with runserver on the django trac [1], and aaugustin asked that I seek feedback here on the list.
In short, the problem I am having is that exceptions thrown during model validation will cause runserver to abort. This might seem like a reasonable outcome, but as I discovered, there exist conditions that will raise an exception from model validation that are not actually fatal to the application. In my particular example, I am using a custom Manager on my object to produce an "extra" field, and then using that field in my "ordering" list. Model validation is complaining because this field isn't a declared Model field. This is a good thing for model validation to complain about, and I do want that message to be shown when I start up runserver. But I don't want runserver to abort, because I happen to know that the model works exactly as intended with that configuration (and I don't know of any better alternative for making django ORDER BY an expression). I'm just a django user, not a developer, so I may be on the wrong track here, but I think runserver ought to catch validation exceptions, report them to the console, and then continue with its attempt to run the server. I included a patch for same in my original trac ticket report. In the worst case, it will end up running a server with models that don't work properly ... in which case the user has ignored the model validation errors at their own peril. Since runserver is not even intended for production use, I don't see much of a downside. Thanks for reading, and I look forward to your comments. Cheers, BJ [1] https://code.djangoproject.com/ticket/19126 -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
