Adrian Holovaty wrote:

> Yeah, you could totally just write the model over the view -- I've
> done that before.
>
> """
> CREATE VIEW foo AS SELECT field_one, field_two FROM bar;
>
> class Foo(meta.Model):
>     field_one = meta.CharField(...)
>     field_two = meta.CharField(...)
> """

What about the ID, though?

I have a view created this way:
create view tags_sorted as select count(*) as c, tag from tags_tags;

And created a model to reflect it. But I can't use it because django
can't select an id from the view.  So what's a handy way to get around
that?

Thanks
--B

Reply via email to