On Dec 16, 7:16 am, Tonton <to.ton...@gmail.com> wrote:
> Hello
> i like to use some database table that are not in my models.py
> in fact some of table will be add and remove by script
>
> is it possible to use some sql queries with it ? on not at all ?
>
> regards
>
> tonton

Hello Tonton,

Yes, you have full access to SQL if you need it regardless of whether
django know about the tables or not.  You can also create a model for
your table as long as the schema is the same, look at inspectdb,
django doesn't care how the table was created.  I have used views to
aggregate date that I only need read only queries and made a model for
the view then set all columns to have editable = False to keep admin
etc from trying to update.

Mark

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to