﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16795	ORM masks exception in Python shells	Frank Wiles	nobody	"If you have a simple model and add a field to it, creating a South migration, but neglect to run the migration querying the model returns an empty list rather than raising an exception.  Properly raises DatabaseError in a template however.  

Steps to reproduce: 
1. Create a simple model named say TestModel with a field. 
2. Populate it with some data. 
3. Create initial migration. 
4. fake your initial
5. Add a new field 
6. Create migration or not, but in either case do not run it to alter the table 
7. run TestModel.objects.all() in Python shell (also happens in IPython) and it returns []

When visiting a view that uses that same QuerySet it properly raises a DatabaseError (from a psycopg2 ProgrammingError), but not in the shell.  I couldn't find any place in the backend where it's being caught and silently ignored.  Attached template debug page. 

"	Bug	closed	Database layer (models, ORM)	1.3	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
