Commit 8e3812eebd8ee9c87fc8dbf73d763bdb42348a69
1 parent
4a907356
Exists in
move_out_plugins
Remove hard-links and fix configuration to gitlab
Signed-off-by: Gustavo Jaruga <darksshades@gmail.com> Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Showing
4 changed files
with
15 additions
and
32 deletions
Show diff stats
colab/plugins/management/commands/import_proxy_data.py
... | ... | @@ -17,7 +17,7 @@ class Command(BaseCommand): |
17 | 17 | |
18 | 18 | for module_name in settings.PROXIED_APPS.keys(): |
19 | 19 | module_path = \ |
20 | - 'colab.plugins.{}.data_api'.format(module_name.split('.')[-1]) | |
20 | + '{}.data_api'.format(module_name.split('.')[-1]) | |
21 | 21 | module = importlib.import_module(module_path) |
22 | 22 | |
23 | 23 | for module_item_name in dir(module): | ... | ... |
colab/search/utils.py
... | ... | @@ -58,7 +58,7 @@ def get_collaboration_data(logged_user, filter_by_user=None): |
58 | 58 | |
59 | 59 | for app_name in app_names: |
60 | 60 | module = importlib \ |
61 | - .import_module('colab.plugins.{}.models'.format(app_name)) | |
61 | + .import_module('{}.models'.format(app_name)) | |
62 | 62 | |
63 | 63 | for module_item_name in dir(module): |
64 | 64 | module_item = getattr(module, module_item_name) | ... | ... |
colab/urls.py
... | ... | @@ -36,7 +36,6 @@ urlpatterns = patterns('', |
36 | 36 | url(r'^colab/admin/', include(admin.site.urls)), |
37 | 37 | |
38 | 38 | url(r'^trac/', include('colab.plugins.trac.urls')), |
39 | - url(r'^gitlab/', include('colab.plugins.gitlab.urls')), | |
40 | 39 | url(r'^social/', include('colab.plugins.noosfero.urls')), |
41 | 40 | url(r'^ci/', include('colab.plugins.jenkins.urls')), |
42 | 41 | ... | ... |
tests/plugins.d/gitlab.py
1 | 1 | from django.utils.translation import ugettext_lazy as _ |
2 | +from colab.plugins.utils.menu import colab_url_factory | |
2 | 3 | |
3 | -name = 'colab.plugins.gitlab' | |
4 | +name = 'colab_gitlab' | |
4 | 5 | verbose_name = 'Gitlab Proxy' |
5 | 6 | |
6 | 7 | upstream = 'localhost' |
7 | 8 | #middlewares = [] |
8 | 9 | |
9 | -menu = { | |
10 | -'title': _('Code'), | |
11 | -'links': ( | |
12 | - (_('Public Projects'), 'public/projects'), | |
13 | -), | |
14 | -'auth_links': ( | |
15 | - (_('Profile'), 'profile'), | |
16 | - (_('New Project'), 'projects/new'), | |
17 | - (_('Projects'), 'dashboard/projects'), | |
18 | - (_('Groups'), 'profile/groups'), | |
19 | - (_('Issues'), 'dashboard/issues'), | |
20 | - (_('Merge Requests'), 'dashboard/merge_requests'), | |
21 | - | |
22 | -), | |
10 | +urls = { | |
11 | + 'include': 'colab_gitlab.urls', | |
12 | + 'namespace': 'gitlab', | |
13 | + 'prefix': 'gitlab', | |
23 | 14 | } |
24 | 15 | |
16 | +menu_title = _('Code') | |
17 | + | |
18 | +url = colab_url_factory('gitlab') | |
25 | 19 | |
26 | -# dpaste: | |
27 | -# dependencies: | |
28 | -# - 'mptt' | |
29 | -# urls: | |
30 | -# include: 'dpaste.urls.dpaste' | |
31 | -# prefix: '^paste/' | |
32 | -# namespace: 'dpaste' | |
33 | -# menu: | |
34 | -# title: 'Dpaste' | |
35 | -# links: | |
36 | -# Public Projects: '/paste' | |
37 | -# auth_links: | |
38 | -# Profile: '/projects' | |
39 | -# New Project: '/projects/new' | |
20 | +menu_urls = ( | |
21 | + url(display=_('Profile'), viewname='gitlab', kwargs={'path': '/profile/anonymous'}, auth=False), | |
22 | + url(display=_('Profile Two'), viewname='gitlab', kwargs={'path': '/profile/logged'}, auth=True), | |
23 | +) | ... | ... |