summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tbc/urls.py2
-rwxr-xr-xtbc/views.py19
2 files changed, 20 insertions, 1 deletions
diff --git a/tbc/urls.py b/tbc/urls.py
index 0aa0b3c..7ee91aa 100644
--- a/tbc/urls.py
+++ b/tbc/urls.py
@@ -2,7 +2,7 @@ from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
- url(r'^$', 'tbc.views.Home', name='Home'),
+ url(r'^$', 'tbc.views.TemporarilyUnavailable', name='TemporarilyUnavailable'),
url(r'^internship-forms/$', 'tbc.views.InternshipForms', name='InternshipForms'),
url(r'^about-pythontbc/$', 'tbc.views.AboutPytbc', name='AboutPytbc'),
url(r'^register/$', 'tbc.views.UserRegister', name='UserRegister'),
diff --git a/tbc/views.py b/tbc/views.py
index c352ed7..7f5d2ad 100755
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -66,6 +66,7 @@ def TemporarilyUnavailable(request):
def Home(request):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
images = []
if request.user.is_anonymous():
context['anonymous'] = True
@@ -100,6 +101,7 @@ def Home(request):
def UserLogin(request):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
context.update(csrf(request))
if 'require_login' in request.GET:
context['require_login'] = True
@@ -139,6 +141,7 @@ def UserLogin(request):
def UserRegister(request):
+ return render_to_response('tbc/unavailable.html', context)
if request.method == 'POST':
form = UserRegisterForm(request.POST)
if form.is_valid():
@@ -158,6 +161,7 @@ def UserRegister(request):
def UserProfile(request):
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
if user.is_authenticated():
if request.method == 'POST':
@@ -186,6 +190,7 @@ def UserProfile(request):
def UserLogout(request):
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
if user.is_authenticated() and user.is_active:
logout(request)
@@ -193,6 +198,7 @@ def UserLogout(request):
def ForgotPassword(request):
+ return render_to_response('tbc/unavailable.html', context)
context = {}
user_emails = []
context.update(csrf(request))
@@ -230,6 +236,7 @@ def ForgotPassword(request):
def UpdatePassword(request):
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
context = {}
context.update(csrf(request))
@@ -267,6 +274,7 @@ def UpdatePassword(request):
def SubmitBook(request):
+ return render_to_response('tbc/unavailable.html', context)
curr_user = request.user
context = {}
if request.method == 'POST':
@@ -295,6 +303,7 @@ def SubmitBook(request):
def UpdateBook(request):
+ return render_to_response('tbc/unavailable.html', context)
current_user = request.user
user_profile = Profile.objects.get(user=current_user)
try:
@@ -336,6 +345,7 @@ def UpdateBook(request):
def ContentUpload(request, book_id=None):
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
curr_book = Book.objects.get(id=book_id)
if request.method == 'POST':
@@ -375,6 +385,7 @@ def ContentUpload(request, book_id=None):
def UpdateContent(request, book_id=None):
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
current_book = Book.objects.get(id=book_id)
chapters_to_update = Chapters.objects.filter(book=current_book)
@@ -444,6 +455,7 @@ def GetZip(request, book_id=None):
def BookDetails(request, book_id=None):
+ return render_to_response('tbc/unavailable.html', context)
context = {}
if request.user.is_anonymous():
context['anonymous'] = True
@@ -462,6 +474,7 @@ def BookDetails(request, book_id=None):
def BookReview(request, book_id=None):
+ return render_to_response('tbc/unavailable.html', context)
context = {}
if is_reviewer(request.user):
if book_id:
@@ -489,6 +502,7 @@ def BookReview(request, book_id=None):
def ApproveBook(request, book_id=None):
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
context = {}
if is_reviewer(request.user):
@@ -541,6 +555,7 @@ def ApproveBook(request, book_id=None):
def NotifyChanges(request, book_id=None):
+ return render_to_response('tbc/unavailable.html', context)
context = {}
if is_reviewer(request.user):
book = Book.objects.get(id=book_id)
@@ -565,6 +580,7 @@ def NotifyChanges(request, book_id=None):
def BrowseBooks(request):
+ return render_to_response('tbc/unavailable.html', context)
context = {}
category = None
images = []
@@ -598,6 +614,7 @@ def BrowseBooks(request):
def ConvertNotebook(request, notebook_path=None):
+ return render_to_response('tbc/unavailable.html', context)
path = os.path.abspath(os.path.dirname(__file__))
path = path+"/static/uploads/"
path = path+notebook_path
@@ -618,6 +635,7 @@ def ConvertNotebook(request, notebook_path=None):
def CompletedBooks(request):
+ return render_to_response('tbc/unavailable.html', context)
context = {}
images = []
if request.user.is_anonymous():
@@ -631,6 +649,7 @@ def CompletedBooks(request):
def BooksUnderProgress(request):
+ return render_to_response('tbc/unavailable.html', context)
context = {}
images = []
if request.user.is_anonymous():