# coding: utf-8

from __future__ import absolute_import
from __future__ import unicode_literals


def url(regex, view, *args, **kwargs):
    """
    Вызывает as_view() для CBV.
    """
    import inspect
    from django.conf.urls import url
    if inspect.isclass(view):
        view = view.as_view()
    return url(regex, view, *args, **kwargs)
