summaryrefslogtreecommitdiff
path: root/tbc
diff options
context:
space:
mode:
authorhardythe12014-06-17 14:03:02 +0530
committerhardythe12014-06-17 14:03:02 +0530
commit1db172fff93cc3297ba1158dce48feca438ad0ed (patch)
tree4481032a782da2461a682b8216c85d662a43199a /tbc
parente5e3bc39068e9c6e33080c4e896a6258e6ad4aae (diff)
downloadPython-TBC-Interface-1db172fff93cc3297ba1158dce48feca438ad0ed.tar.gz
Python-TBC-Interface-1db172fff93cc3297ba1158dce48feca438ad0ed.tar.bz2
Python-TBC-Interface-1db172fff93cc3297ba1158dce48feca438ad0ed.zip
disabling links
Diffstat (limited to 'tbc')
-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 22aaa3b..6119154 100755
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -65,6 +65,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
@@ -99,6 +100,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):
context = {}
+ 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):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
if user.is_authenticated():
if request.method == 'POST':
@@ -185,6 +189,7 @@ def UserProfile(request):
def UserLogout(request):
context = {}
+ 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):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
user_emails = []
context.update(csrf(request))
if request.user.is_anonymous():
@@ -230,6 +236,7 @@ def ForgotPassword(request):
def UpdatePassword(request):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
context.update(csrf(request))
if user.is_authenticated():
@@ -267,6 +274,7 @@ def UpdatePassword(request):
def SubmitBook(request):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
curr_user = request.user
if request.method == 'POST':
form = BookForm(request.POST)
@@ -295,6 +303,7 @@ def SubmitBook(request):
def UpdateBook(request):
context = {}
+ 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):
context = {}
+ 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):
context = {}
+ 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):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
if request.user.is_anonymous():
context['anonymous'] = True
else:
@@ -462,6 +474,7 @@ def BookDetails(request, book_id=None):
def BookReview(request, book_id=None):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
if is_reviewer(request.user):
if book_id:
book = Book.objects.get(id=book_id)
@@ -489,6 +502,7 @@ def BookReview(request, book_id=None):
def ApproveBook(request, book_id=None):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
user = request.user
if is_reviewer(request.user):
if request.method == 'POST' and request.POST['approve_notify'] == "approve":
@@ -542,6 +556,7 @@ def ApproveBook(request, book_id=None):
def NotifyChanges(request, book_id=None):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
if is_reviewer(request.user):
book = Book.objects.get(id=book_id)
if request.method == 'POST':
@@ -566,6 +581,7 @@ def NotifyChanges(request, book_id=None):
def BrowseBooks(request):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
category = None
images = []
book_images = []
@@ -599,6 +615,7 @@ def BrowseBooks(request):
def ConvertNotebook(request, notebook_path=None):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
path = os.path.abspath(os.path.dirname(__file__))
path = path+"/static/uploads/"
path = path+notebook_path
@@ -620,6 +637,7 @@ def ConvertNotebook(request, notebook_path=None):
def CompletedBooks(request):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
images = []
if request.user.is_anonymous():
context['anonymous'] = True
@@ -633,6 +651,7 @@ def CompletedBooks(request):
def BooksUnderProgress(request):
context = {}
+ return render_to_response('tbc/unavailable.html', context)
images = []
if request.user.is_anonymous():
context['anonymous'] = True