Ejemplo n.º 1
0
    def get_urls(self):
        from django.conf.urls.defaults import patterns, url, include

        urlpatterns = patterns(
            "",
            # filebrowser urls (views)
            url(r"^browse/$", path_exists(self, self.filebrowser_view(self.browse)), name="fb_browse"),
            url(r"^createdir/", path_exists(self, self.filebrowser_view(self.createdir)), name="fb_createdir"),
            url(r"^upload/", path_exists(self, self.filebrowser_view(self.upload)), name="fb_upload"),
            url(
                r"^delete_confirm/$",
                file_exists(self, path_exists(self, self.filebrowser_view(self.delete_confirm))),
                name="fb_delete_confirm",
            ),
            url(
                r"^delete/$", file_exists(self, path_exists(self, self.filebrowser_view(self.delete))), name="fb_delete"
            ),
            url(
                r"^detail/$", file_exists(self, path_exists(self, self.filebrowser_view(self.detail))), name="fb_detail"
            ),
            url(
                r"^version/$",
                file_exists(self, path_exists(self, self.filebrowser_view(self.version))),
                name="fb_version",
            ),
            # non-views
            url(r"^upload_file/$", csrf_exempt(self._upload_file), name="fb_do_upload"),
        )

        return urlpatterns
Ejemplo n.º 2
0
    def get_urls(self):
        "URLs for a filebrowser.site"
        try:
            from django.conf.urls import url, patterns
        except ImportError:
            # for Django version less then 1.4
            from django.conf.urls.defaults import url, patterns

        # filebrowser urls (views)
        urlpatterns = patterns(
            "",
            url(r"^browse/$", path_exists(self, filebrowser_view(self.browse)), name="fb_browse"),
            url(r"^createdir/", path_exists(self, filebrowser_view(self.createdir)), name="fb_createdir"),
            url(r"^upload/", path_exists(self, filebrowser_view(self.upload)), name="fb_upload"),
            url(
                r"^delete_confirm/$",
                file_exists(self, path_exists(self, filebrowser_view(self.delete_confirm))),
                name="fb_delete_confirm",
            ),
            url(r"^delete/$", file_exists(self, path_exists(self, filebrowser_view(self.delete))), name="fb_delete"),
            url(r"^detail/$", file_exists(self, path_exists(self, filebrowser_view(self.detail))), name="fb_detail"),
            url(r"^version/$", file_exists(self, path_exists(self, filebrowser_view(self.version))), name="fb_version"),
            url(r"^upload_file/$", staff_member_required(csrf_exempt(self._upload_file)), name="fb_do_upload"),
        )
        return urlpatterns
Ejemplo n.º 3
0
    def get_urls(self):
        from django.conf.urls import url, include

        urlpatterns = [
            # filebrowser urls (views)
            url(r"^browse/$", path_exists(self, self.filebrowser_view(self.browse)), name="fb_browse"),
            url(r"^createdir/", path_exists(self, self.filebrowser_view(self.createdir)), name="fb_createdir"),
            url(r"^upload/", path_exists(self, self.filebrowser_view(self.upload)), name="fb_upload"),
            url(
                r"^delete_confirm/$",
                file_exists(self, path_exists(self, self.filebrowser_view(self.delete_confirm))),
                name="fb_delete_confirm",
            ),
            url(
                r"^delete/$", file_exists(self, path_exists(self, self.filebrowser_view(self.delete))), name="fb_delete"
            ),
            url(
                r"^detail/$", file_exists(self, path_exists(self, self.filebrowser_view(self.detail))), name="fb_detail"
            ),
            url(
                r"^version/$",
                file_exists(self, path_exists(self, self.filebrowser_view(self.version))),
                name="fb_version",
            ),
            # non-views
            # url(r'^upload_file/$', staff_member_required(csrf_exempt(self._upload_file)), name="fb_do_upload"),
            url(r"^upload_file/$", login_required(csrf_exempt(self._upload_file)), name="fb_do_upload"),
        ]

        return urlpatterns
    def get_urls(self):
        "URLs for a filebrowser.site"
        from django.conf.urls import url, patterns

        # filebrowser urls (views)
        return [
            url(r'^browse/$', path_exists(self, filebrowser_view(self.browse)), name="fb_browse"),
            url(r'^createdir/', path_exists(self, filebrowser_view(self.createdir)), name="fb_createdir"),
            url(r'^upload/', path_exists(self, filebrowser_view(self.upload)), name="fb_upload"),
            url(r'^delete_confirm/$', file_exists(self, path_exists(self, filebrowser_view(self.delete_confirm))), name="fb_delete_confirm"),
            url(r'^delete/$', file_exists(self, path_exists(self, filebrowser_view(self.delete))), name="fb_delete"),
            url(r'^detail/$', file_exists(self, path_exists(self, filebrowser_view(self.detail))), name="fb_detail"),
            url(r'^version/$', file_exists(self, path_exists(self, filebrowser_view(self.version))), name="fb_version"),
            url(r'^upload_file/$', staff_member_required(csrf_exempt(self._upload_file)), name="fb_do_upload"),
        ]
    def get_urls(self):
        from django.conf.urls.defaults import patterns, url, include    

        urlpatterns = patterns('',
    
            # filebrowser urls (views)
            url(r'^browse/$', path_exists(self, self.filebrowser_view(self.browse)), name="fb_browse"),
            url(r'^createdir/', path_exists(self, self.filebrowser_view(self.createdir)), name="fb_createdir"),
            url(r'^upload/', path_exists(self, self.filebrowser_view(self.upload)), name="fb_upload"),
            url(r'^delete_confirm/$', file_exists(self, path_exists(self, self.filebrowser_view(self.delete_confirm))), name="fb_delete_confirm"),
            url(r'^delete/$', file_exists(self, path_exists(self, self.filebrowser_view(self.delete))), name="fb_delete"),
            url(r'^detail/$', file_exists(self, path_exists(self, self.filebrowser_view(self.detail))), name="fb_detail"),
            url(r'^version/$', file_exists(self, path_exists(self, self.filebrowser_view(self.version))), name="fb_version"),
            # non-views
            url(r'^upload_file/$', staff_member_required(csrf_exempt(self._upload_file)), name="fb_do_upload"),
            
        )

        return urlpatterns
Ejemplo n.º 6
0
    def get_urls(self):
        from django.conf.urls import patterns, url, include

        urlpatterns = super(CropFileBrowserSite, self).get_urls()

        urlpatterns += patterns('',
            url(r'^crop/$', file_exists(self, path_exists(self, filebrowser_view(self.crop))), name="fb_crop"),
        )

        return urlpatterns
Ejemplo n.º 7
0
def get_urls(self):
    "URLs for a filebrowser.site"
    try:
        from django.conf.urls import url, patterns
    except ImportError:
        # for Django version less then 1.4
        from django.conf.urls.defaults import url, patterns

    # filebrowser urls (views)
    urlpatterns = patterns(
        '',
        url(r'^browse/$', path_exists(self, filebrowser_view_override(self.browse)), name="fb_browse"),
        url(r'^createdir/', path_exists(self, filebrowser_view_override(self.createdir)), name="fb_createdir"),
        url(r'^upload/', path_exists(self, filebrowser_view_override(self.upload)), name="fb_upload"),
        url(r'^delete_confirm/$', file_exists(self, path_exists(self, filebrowser_view_override(self.delete_confirm))), name="fb_delete_confirm"),
        url(r'^delete/$', file_exists(self, path_exists(self, filebrowser_view_override(self.delete))), name="fb_delete"),
        url(r'^detail/$', file_exists(self, path_exists(self, filebrowser_view_override(self.detail))), name="fb_detail"),
        url(r'^version/$', file_exists(self, path_exists(self, filebrowser_view_override(self.version))), name="fb_version"),
        url(r'^upload_file/$', csrf_exempt(self._upload_file), name="fb_do_upload"),
    )
    return urlpatterns