Is it possible to create a view peewee or join a created query with model?
Ok, I solved it. 

I created a view in my database and then in my models.py I created a model for it. 

```
class UserOrder(BaseModel):
    link_to_id = PrimaryKeyField()
    avg_user = FloatField()

    class Meta:
        db_table = 'user_order'
```

Where db_table is the reference to the actual view and the fields in the view are listed above. Then I could happily join the two together. 

I tried doing this. But got an error. 

```
daily = DailyData.select(DailyData.link_to, fn.avg(DailyData.nr_users).alias('avg_user')).group_by(DailyData.link_to)

output = ExtensionData.select(ExtensionData.name).join(daily).order_by(sql('avg_user DESC')).limit(500)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/scraper/.virtualenvs/superfish/lib/python2.6/site-packages/peewee.py", line 233, in inner
    func(clone, *args, **kwargs)
  File "/home/scraper/.virtualenvs/superfish/lib/python2.6/site-packages/peewee.py", line 1708, in join
    if not self._query_ctx._meta.rel_exists(model_class) and on is None:
  File "/home/scraper/.virtualenvs/superfish/lib/python2.6/site-packages/peewee.py", line 2849, in rel_exists
    return self.rel_for_model(model) or self.reverse_rel_for_model(model)
  File "/home/scraper/.virtualenvs/superfish/lib/python2.6/site-packages/peewee.py", line 2846, in reverse_rel_for_model
    return model._meta.rel_for_model(self.model_class)
AttributeError: 'SelectQuery' object has no attribute '_meta'
```

DailyData.link_to is the foreign key to ExtensionData. Is there another way of doing this?
