Skip to content

Commit

Permalink
Merge branch 'release/0.18.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ri-gilfanov committed Jun 26, 2021
2 parents 137983f + f4f5511 commit 573d9ff
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 24 deletions.
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

6 changes: 4 additions & 2 deletions aiohttp_sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
SABaseView,
SAMixin,
SAModelMixin,
SAModelView,
SAView,
)

__version__ = '0.18.0'
__version__ = '0.18.1'

__all__ = [
'SA_DEFAULT_KEY',
Expand All @@ -41,7 +42,7 @@
'SABaseView',
'SAMixin',
'SAModelMixin',
'SAView',
'SAModelView',
'bind',
'init_db',
'sa_decorator',
Expand All @@ -52,6 +53,7 @@
# Synonyms
'DEFAULT_KEY',
'SAAbstractView',
'SAView',
'sa_bind',
'sa_init_db',
]
Expand Down
3 changes: 2 additions & 1 deletion aiohttp_sqlalchemy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ class SABaseView(View, SAMixin):
"""SQLAlchemy class based view."""


class SAView(View, SAModelMixin):
class SAModelView(View, SAModelMixin):
"""SQLAlchemy single model class based view."""


# Synonyms
SAAbstractView = SAMixin
SAOneModelMixin = SAModelMixin
SAView = SAModelView
4 changes: 2 additions & 2 deletions docs/advansed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ You can apply ``sa_decorator(key)`` with class based views. For example:
.. code-block:: python
from aiohttp import web
from aiohttp_sqlalchemy import SAView, sa_decorator
from aiohttp_sqlalchemy import SABaseView, sa_decorator
SPECIFIC_DB_KEY = 'sa_specific'
SPECIFIC_DB_URL = 'sqlite+aiosqlite:///'
class SpecificHandler(SAView):
class SpecificHandler(SABaseView):
@property
def specific_session(self):
return self.sa_session(SPECIFIC_DB_KEY)
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ Class based views
.. code-block:: python
from aiohttp import web
from aiohttp_sqlalchemy import SAView
from aiohttp_sqlalchemy import SABaseView
class MyClassBasedView(SAView):
class MyClassBasedView(SABaseView):
async def get(self):
db_session = self.sa_session()
Expand Down
9 changes: 9 additions & 0 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ Class based views
.. autoclass:: aiohttp_sqlalchemy.SAMixin
:members:

.. autoclass:: aiohttp_sqlalchemy.SAModelMixin
:members:

.. autoclass:: aiohttp_sqlalchemy.SABaseView
:members:

.. autoclass:: aiohttp_sqlalchemy.SAModelView
:members:

Additional functionality
------------------------
.. autofunction:: aiohttp_sqlalchemy.sa_decorator
Expand Down
10 changes: 10 additions & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
========
Releases
========
Version 0.18.1
--------------
**Added**

* Synonym ``SAView`` for ``SAModelView``.

**Changed**

* Rename ``SAView`` to ``SAModelView``.

Version 0.18
------------
**Changed**
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiohttp-sqlalchemy"
version = "0.18.0"
version = "0.18.1"
description = "SQLAlchemy 1.4 / 2.0 support for aiohttp."
authors = [
"Ruslan Ilyasovich Gilfanov <ri.gilfanov@yandex.ru>",
Expand Down

0 comments on commit 573d9ff

Please sign in to comment.