diff --git a/colab/plugins/gitlab/__init__.py b/colab/plugins/gitlab/__init__.py deleted file mode 100644 index 58d7ecd..0000000 --- a/colab/plugins/gitlab/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ - - -default_app_config = 'colab.plugins.gitlab.apps.ProxyGitlabAppConfig' - -from colab.plugins.utils.widget_manager import WidgetManager -from colab.plugins.gitlab.widgets import GitlabProfileWidget - -WidgetManager.register_widget('profile', GitlabProfileWidget()) diff --git a/colab/plugins/gitlab/profile/diazo.xml b/colab/plugins/gitlab/profile/diazo.xml deleted file mode 100644 index 61577ef..0000000 --- a/colab/plugins/gitlab/profile/diazo.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - /account//edit?code=/ - - - /account//edit?code=/ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/colab/plugins/gitlab/templates/proxy/gitlab_profile.html b/colab/plugins/gitlab/templates/proxy/gitlab_profile.html deleted file mode 100644 index 8f97797..0000000 --- a/colab/plugins/gitlab/templates/proxy/gitlab_profile.html +++ /dev/null @@ -1,49 +0,0 @@ - -{% load static from staticfiles %} - -{% block head_css %} - -{% endblock %} - -{% block head_js %} - -{% endblock %} - -
- diff --git a/colab/plugins/gitlab/urls.py b/colab/plugins/gitlab/urls.py deleted file mode 100644 index f39fc48..0000000 --- a/colab/plugins/gitlab/urls.py +++ /dev/null @@ -1,8 +0,0 @@ - -from django.conf.urls import patterns, url - -from .views import GitlabProxyView, GitlabProfileProxyView - -urlpatterns = patterns('', - url(r'^(?P.*)$', GitlabProxyView.as_view(), name='gitlab'), -) diff --git a/colab/plugins/gitlab/views.py b/colab/plugins/gitlab/views.py deleted file mode 100644 index ba980a8..0000000 --- a/colab/plugins/gitlab/views.py +++ /dev/null @@ -1,22 +0,0 @@ - -from ..utils.views import ColabProxyView -import os, sys - - -class GitlabProxyView(ColabProxyView): - app_label = 'gitlab' - diazo_theme_template = 'proxy/gitlab.html' - - -class GitlabProfileProxyView(ColabProxyView): - app_label = 'gitlab' - diazo_theme_template = 'proxy/gitlab_profile.html' - - @property - def diazo_rules(self): - child_class_file = sys.modules[self.__module__].__file__ - app_path = os.path.abspath(os.path.dirname(child_class_file)) - diazo_path = os.path.join(app_path, 'profile/diazo.xml') - - self.log.debug("diazo_rules: %s", diazo_path) - return diazo_path diff --git a/colab/plugins/gitlab/widgets.py b/colab/plugins/gitlab/widgets.py deleted file mode 100644 index 0fd7539..0000000 --- a/colab/plugins/gitlab/widgets.py +++ /dev/null @@ -1,35 +0,0 @@ -from colab.plugins.gitlab.views import GitlabProxyView, GitlabProfileProxyView -from colab.plugins.utils.widget_manager import Widget -from django.utils.safestring import mark_safe - - -class GitlabProfileWidget(GitlabProxyView, Widget): - identifier = 'code' - name = 'Gitlab Profile' - default_url = '/gitlab/profile/account' - - def get_body(self): - start = self.content.find('', start) - end = self.content.find('') - print "start = " + str(start) + ", end = " + str(end) - print "content = " + self.content - - if -1 in [start, end]: - return '' - - body = self.content[start + len('>'):end] - return mark_safe(body) - - def generate_content(self, request): - requested_url = request.GET.get('code', self.default_url) - g = GitlabProfileProxyView() - r = g.dispatch(request, requested_url) - - if r.status_code == 302: - location = r.get('Location') - requested_url = location[location.find('/{}/'.format(self.app_label)):] - request.method = 'GET' - r = g.dispatch(request, requested_url) - - self.content = r.content -- libgit2 0.21.2