summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tbc/urls.py2
-rwxr-xr-xtbc/views.py18
2 files changed, 1 insertions, 19 deletions
diff --git a/tbc/urls.py b/tbc/urls.py
index 7ee91aa..0aa0b3c 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.TemporarilyUnavailable', name='TemporarilyUnavailable'),
+ url(r'^$', 'tbc.views.Home', name='Home'),
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 a9e2167..1ef6870 100755
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -65,7 +65,6 @@ 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,7 +99,6 @@ 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
@@ -141,7 +139,6 @@ 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():
@@ -161,7 +158,6 @@ 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':
@@ -196,7 +192,6 @@ 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():
@@ -234,7 +229,6 @@ 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():
@@ -272,7 +266,6 @@ 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)
@@ -301,7 +294,6 @@ 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:
@@ -343,7 +335,6 @@ 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':
@@ -383,7 +374,6 @@ 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)
@@ -453,7 +443,6 @@ 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:
@@ -472,7 +461,6 @@ 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)
@@ -500,7 +488,6 @@ 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":
@@ -554,7 +541,6 @@ 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':
@@ -579,7 +565,6 @@ def NotifyChanges(request, book_id=None):
def BrowseBooks(request):
context = {}
- return render_to_response('tbc/unavailable.html', context)
category = None
images = []
book_images = []
@@ -613,7 +598,6 @@ 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
@@ -635,7 +619,6 @@ 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
@@ -649,7 +632,6 @@ def CompletedBooks(request):
def BooksUnderProgress(request):
context = {}
- return render_to_response('tbc/unavailable.html', context)
images = []
if request.user.is_anonymous():
context['anonymous'] = True