<reponame>pinsily/fireflypro
from django.http import HttpResponse


def index(request):
    base_url = '{scheme}://{host}/'.format(
        scheme=request.scheme, host=request.get_host()
    )
    html_template = '''
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title>Your APP NAME</title>
            <link rel="stylesheet"
                href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
                integrity="<KEY>"
                crossorigin="anonymous">
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
                integrity="<KEY>"
                crossorigin="anonymous">
                </script>
        </head>
        <body>
            <header class="container">
                <section class="row">
                    <article class="col-6">
                        <h1>APP LOGO</h1>
                    </article>
                    <article class="col-6">
                        <nav class="nav">
                            <a href='{url_admin}' class="nav-link">{url_admin}</a>
                        </nav>
                    </article>
                </section>
            </header>
            <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
                integrity="<KEY>"
                crossorigin="anonymous">
                </script>
            <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
                integrity="<KEY>"
                crossorigin="anonymous">
                </script>
        </body>
    </html>
    '''
    html = html_template.format(
        url_admin=base_url + 'admin'
    )
    return HttpResponse(html)

from django.http import HttpResponse


def index(request):
    base_url = '{scheme}://{host}/'.format(
        scheme=request.scheme, host=request.get_host()
    )
    html_template = '''
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title>Your APP NAME</title>
            <link rel="stylesheet"
                href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
                integrity="<KEY>"
                crossorigin="anonymous">
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
                integrity="<KEY>"
                crossorigin="anonymous">
                </script>
        </head>
        <body>
            <header class="container">
                <section class="row">
                    <article class="col-6">
                        <h1>APP LOGO</h1>
                    </article>
                    <article class="col-6">
                        <nav class="nav">
                            <a href='{url_admin}' class="nav-link">{url_admin}</a>
                        </nav>
                    </article>
                </section>
            </header>
            <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
                integrity="<KEY>"
                crossorigin="anonymous">
                </script>
            <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
                integrity="<KEY>"
                crossorigin="anonymous">
                </script>
        </body>
    </html>
    '''
    html = html_template.format(
        url_admin=base_url + 'admin'
    )
    return HttpResponse(html)
<!DOCTYPE html>     <html>         <head>             <meta charset="UTF-8">             <title>Your APP NAME</title>             <link rel="stylesheet"                 href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"                 integrity="<KEY>"                 crossorigin="anonymous">             <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"                 integrity="<KEY>"                 crossorigin="anonymous">                 </script>         </head>         <body>             <header class="container">                 <section class="row">                     <article class="col-6">                         <h1>APP LOGO</h1>                     </article>                     <article class="col-6">                         <nav class="nav">                             <a href='{url_admin}' class="nav-link">{url_admin}</a>                         </nav>                     </article>                 </section>             </header>             <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"                 integrity="<KEY>"                 crossorigin="anonymous">                 </script>             <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"                 integrity="<KEY>"                 crossorigin="anonymous">                 </script>         </body>     </html>