diff options
-rw-r--r-- | online_test/urls.py | 2 | ||||
-rw-r--r-- | online_test/views.py | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/online_test/urls.py b/online_test/urls.py index 28c2a26..a09e961 100644 --- a/online_test/urls.py +++ b/online_test/urls.py @@ -2,6 +2,7 @@ from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin +from online_test import views admin.autodiscover() urlpatterns = [ @@ -10,6 +11,7 @@ urlpatterns = [ # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), + url(r'^$', views.index, name='index'), url(r'^exam/', include('yaksh.urls', namespace='yaksh', app_name='yaksh')), url(r'^exam/reset/', include('yaksh.urls_password_reset')), url(r'^', include('social.apps.django_app.urls', namespace='social')), diff --git a/online_test/views.py b/online_test/views.py new file mode 100644 index 0000000..8fcecd3 --- /dev/null +++ b/online_test/views.py @@ -0,0 +1,7 @@ +from django.shortcuts import redirect + +from .settings import URL_ROOT + + +def index(request): + return redirect('{0}/exam/'.format(URL_ROOT)) |