0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Made sqlite introspection also show views like other backends

Refs #6730.
This commit is contained in:
Claude Paroz 2013-10-15 17:17:32 +02:00
parent 349c12d3f5
commit 2af58a2cef

View File

@ -59,7 +59,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
# generation.
cursor.execute("""
SELECT name FROM sqlite_master
WHERE type='table' AND NOT name='sqlite_sequence'
WHERE type in ('table', 'view') AND NOT name='sqlite_sequence'
ORDER BY name""")
return [row[0] for row in cursor.fetchall()]