diff options
-rw-r--r-- | online_test/settings.py | 6 | ||||
-rw-r--r-- | online_test/urls.py | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/online_test/settings.py b/online_test/settings.py index e53164e..279f1c3 100644 --- a/online_test/settings.py +++ b/online_test/settings.py @@ -92,6 +92,12 @@ LOGIN_REDIRECT_URL = '/exam/' SOCIAL_AUTH_LOGIN_ERROR_URL = '/exam/login/' +MEDIA_URL = "/data/" + +MEDIA_ROOT = os.path.join(BASE_DIR+"/yaksh/", "data") + +LOGIN_URL = '/exam/login' + EMAIL_USE_TLS = False EMAIL_HOST = 'your_email_host' diff --git a/online_test/urls.py b/online_test/urls.py index 829b138..8e733b9 100644 --- a/online_test/urls.py +++ b/online_test/urls.py @@ -1,5 +1,6 @@ from django.conf.urls import patterns, include, url - +from django.conf import settings +from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() @@ -12,3 +13,4 @@ urlpatterns = [ url(r'^exam/', include('yaksh.urls', namespace='yaksh', app_name='yaksh')), url(r'^', include('social.apps.django_app.urls', namespace='social')), ] +urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |