django-eav2/eav/__init__.py
2018-04-06 13:59:51 +02:00

36 lines
1.3 KiB
Python

#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 coding=utf-8
#
# This software is derived from EAV-Django originally written and
# copyrighted by Andrey Mikhaylenko <http://pypi.python.org/pypi/eav-django>
#
# This is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with EAV-Django. If not, see <http://gnu.org/licenses/>.
VERSION = (0, 9, 2)
def get_version():
version = "%s.%s" % (VERSION[0], VERSION[1])
if VERSION[2] != 0:
version = "%s.%s" % (version, VERSION[2])
return version
__version__ = get_version()
def register(model_cls, config_cls=None):
from .registry import Registry
Registry.register(model_cls, config_cls)
def unregister(model_cls):
from .registry import Registry
Registry.unregister(model_cls)