blob: 6276736d2edcb32b5143e9b79b886ff369d98bdd [file] [log] [blame]
srikanth116e6e82014-08-19 07:22:37 -07001#
2# Copyright (c) 2013 Big Switch Networks, Inc.
3#
4# Licensed under the Eclipse Public License, Version 1.0 (the
5# "License"); you may not use this file except in compliance with the
6# License. You may obtain a copy of the License at
7#
8# http://www.eclipse.org/legal/epl-v10.html
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied. See the License for the specific language governing
14# permissions and limitations under the License.
15#
16
17# Views for the application
18#
19
20import os
21from django.shortcuts import render_to_response
22from sdncon.apploader import AppLoader, AppLister
23from sdncon.clusterAdmin.utils import isCloudBuild
24
25docs_enabled = False
26
27def bsc_app_init():
28 if not docs_enabled:
29 return
30
31 APP_NAME = os.path.dirname(__file__).split("/")[-1]
32 app = AppLister(APP_NAME, "Documentation", 9, "User Guide")
33 app.addTab("docs", "User Guide", user_guide)
34 AppLoader.addApp(app)
35
36def user_guide(request):
37 url = '/docs/static/pdf/user-guide.pdf'
38 return render_to_response('apps/docs/templates/pdf_doc.html', {'url' : url})