本文整理匯總了Python中djangodav.views.DavView.as_view方法的典型用法代碼示例。如果您正苦於以下問題:Python DavView.as_view方法的具體用法?Python DavView.as_view怎麽用?Python DavView.as_view使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類djangodav.views.DavView
的用法示例。
在下文中一共展示了DavView.as_view方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: patterns
# 需要導入模塊: from djangodav.views import DavView [as 別名]
# 或者: from djangodav.views.DavView import as_view [as 別名]
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with DjangoDav. If not, see <http://www.gnu.org/licenses/>.
from djangodav.acls import FullAcl
from djangodav.locks import DummyLock
from djangodav.views import DavView
from django.conf.urls import patterns
from samples.fs.resources import TempDirWebDavResource
from samples.db.resources import MyDBDavResource
from samples.auth.views.rest import RestAuthDavView
from samples.auth.views.tasty import TastyAuthDavView
urlpatterns = patterns('',
# Mirroring tmp folder
(r'^fs(?P<path>.*)$', DavView.as_view(resource_class=TempDirWebDavResource, lock_class=DummyLock, acl_class=FullAcl)),
# Db file keeper
(r'^db(?P<path>.*)$', DavView.as_view(resource_class=MyDBDavResource, lock_class=DummyLock, acl_class=FullAcl)),
# REST framework auth
(r'^auth/rest(?P<path>.*)$', RestAuthDavView.as_view(resource_class=TempDirWebDavResource, lock_class=DummyLock, acl_class=FullAcl)),
# Tastypie auth
(r'^auth/tasty(?P<path>.*)$', TastyAuthDavView.as_view(resource_class=TempDirWebDavResource, lock_class=DummyLock, acl_class=FullAcl)),
)