Compare commits

..

9 Commits

Author SHA1 Message Date
Kobi Tal
45a9200ff6 Finished Release v2.1.3 2022-11-29 15:17:14 +02:00
Kobi Tal
623f3e7dac releasing 2.1.3 2022-11-29 15:15:57 +02:00
Kobi Tal
070b2c3ff4
Merge pull request #197 from Infinidat/fix_paginate_alias
Fix pagination for models with alias fields
2022-11-29 15:08:45 +02:00
Kobi Tal
d7a26a81bb Fix pagination for models with alias fields 2022-11-29 15:06:44 +02:00
Kobi Tal
09aeddf677 Finished Release v2.1.2 2022-07-19 11:10:47 +03:00
Kobi Tal
2777d3084c Releasing v2.1.2 2022-07-19 11:06:19 +03:00
Kobi Tal
7b15567a62 Bump python version to 3.8.12 2022-07-19 10:59:30 +03:00
Kobi Tal
359809e819 Releasing v2.1.2 2022-07-19 10:56:22 +03:00
Kobi Tal
272729153c Add model to QuerySet to support django-rest-framework 3 2022-07-18 17:55:51 +03:00
4 changed files with 12 additions and 2 deletions

View File

@ -1,6 +1,14 @@
Change Log
==========
v2.1.3
------
- Fix pagination for models with alias columns
v2.1.2
------
- Add `QuerySet.model` to support django-rest-framework 3
v2.1.1
------
- Improve support of ClickHouse v21.9 (mangototango)

View File

@ -30,7 +30,7 @@ homepage = https://github.com/Infinidat/infi.clickhouse_orm
[isolated-python]
recipe = infi.recipe.python
version = v3.8.0.2
version = v3.8.12
[setup.py]
recipe = infi.recipe.template.version

View File

@ -319,7 +319,8 @@ class Database(object):
elif page_num < 1:
raise ValueError('Invalid page number: %d' % page_num)
offset = (page_num - 1) * page_size
query = 'SELECT * FROM $table'
query = 'SELECT {} FROM $table'.format(", ".join(model_class.fields().keys()))
if conditions:
if isinstance(conditions, Q):
conditions = conditions.to_sql(model_class)

View File

@ -292,6 +292,7 @@ class QuerySet(object):
Initializer. It is possible to create a queryset like this, but the standard
way is to use `MyModel.objects_in(database)`.
"""
self.model = model_cls
self._model_cls = model_cls
self._database = database
self._order_by = []