Merge Request #13

Merged
softwarepublico/colab!13
Created by Gustavo Jaruga Cruz

Colab home redirect

Settings COLAB_HOME_URL indicates the homepage redirect page, empty if default homepage.

Assignee: Sergio Oliveira
Milestone: None

Merged by Sergio Oliveira

Source branch has been removed
Commits (1)
2 participants
colab/home/views.py
@@ -13,8 +13,8 @@ from colab.search.utils import trans @@ -13,8 +13,8 @@ from colab.search.utils import trans
13 from colab.super_archives.models import Thread 13 from colab.super_archives.models import Thread
14 14
15 15
16 -def index(request):  
17 - """Index page view""" 16 +def dashboard(request):
  17 + """Dashboard page"""
18 18
19 19
20 latest_threads = Thread.objects.all()[:6] 20 latest_threads = Thread.objects.all()[:6]
@@ -13,7 +13,7 @@ admin.autodiscover() @@ -13,7 +13,7 @@ admin.autodiscover()
13 13
14 urlpatterns = patterns('', 14 urlpatterns = patterns('',
15 url(r'^robots.txt$', 'colab.home.views.robots', name='robots'), 15 url(r'^robots.txt$', 'colab.home.views.robots', name='robots'),
16 - url(r'^dashboard$', 'colab.home.views.index', name='dashboard'), 16 + url(r'^dashboard$', 'colab.home.views.dashboard', name='dashboard'),
1
17 url(r'^$', RedirectView.as_view(url=settings.COLAB_HOME_URL), name='home'), 17 url(r'^$', RedirectView.as_view(url=settings.COLAB_HOME_URL), name='home'),
18 18
19 url(r'^open-data/$', TemplateView.as_view(template_name='open-data.html'), 19 url(r'^open-data/$', TemplateView.as_view(template_name='open-data.html'),
@@ -46,4 +46,4 @@ if settings.DEBUG: @@ -46,4 +46,4 @@ if settings.DEBUG:
46 urlpatterns += static.static( 46 urlpatterns += static.static(
47 settings.MEDIA_URL, 47 settings.MEDIA_URL,
48 document_root=settings.MEDIA_ROOT 48 document_root=settings.MEDIA_ROOT
49 - )  
50 \ No newline at end of file 49 \ No newline at end of file
  50 + )
    9fe63c7bd60deeb55e409a1d7dd173f5?s=40&d=identicon
    Sergio Oliveira started a discussion on the outdated diff
    last updated by Sergio Oliveira
    colab/urls.py
    11 12 admin.autodiscover()
    12 13  
    13 14 urlpatterns = patterns('',
    14   - url(r'^$', 'colab.home.views.index', name='home'),
    15 15 url(r'^robots.txt$', 'colab.home.views.robots', name='robots'),
      16 + url(r'^dashboard$', 'colab.home.views.index', name='dashboard'),
    1
    9fe63c7bd60deeb55e409a1d7dd173f5?s=40&d=identicon
    Sergio Oliveira started a discussion on the outdated diff
    last updated by Sergio Oliveira
    colab/urls.py
    11 12 admin.autodiscover()
    12 13  
    13 14 urlpatterns = patterns('',
    14   - url(r'^$', 'colab.home.views.index', name='home'),
    15 15 url(r'^robots.txt$', 'colab.home.views.robots', name='robots'),
      16 + url(r'^dashboard$', 'colab.home.views.index', name='dashboard'),
      17 + url(r'^$', RedirectView.as_view(url=settings.COLAB_HOME_URL), name='home'),
    1