views:

47

answers:

2

Django: If I added new tables to database, how can I query them? Do I need to create the relevant models first? Or django creates it by itself?

More specifically, I installed another django app, it created several database tables in database, and now I want to get some specific data from them? What are the correct approaches? Thank you very much!

A: 

Django doen't follow convention over configuration philosophy. you have to explicitly create the backing model for the table and in the meta tell it about the table name...

mossplix
+1  A: 

I suppose another django app has all model files needed to access those tables, you should just try importing those packages and use this app's models.

Vladimir Volodin