[PYTHON] Deploy a Django app made with PTVS on Azure

Run Django on Visual Stadio 2015

For more information on PTVS, see here.

Create a Django project in Visual stadio 2015. Comment out home in Views.py and write a program that calls test.html instead.

Views.py


from django.template import RequestContext
from datetime import datetime

def home(request):
        assert isinstance(request, HttpRequest)
        return render(request,'app/test.html')
"""
def home(request):
    assert isinstance(request, HttpRequest)
    return render(
        request,
        'app/index.html',
        context_instance = RequestContext(request,
        {
            'title':'Home Page',
            'year':datetime.now().year,
        })
    )
“""

Try creating a new test.html. [Templates] ➡️ [app] ➡️ [test.html (create new with Add / New Item)]

test.html


<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>test</title>
</head>
<body>
    <div>My Name is saiyuki1919</div>
    Can you ?
</body>
</html>

** Run ** will display as below 1.png

Deploy on Azure

Right-click on the project you are creating and select [** Pubulish **] 2.png

Now select Microsoft Azure Web Apps and press ** Publish ** 3.png

Now press ** New ** to create a new one.

*** Web App name: Optional *** *** App Service plan: New *** *** Database server: Select No database *** *** Other: Appropriate and OK *** 5.png

After confirming it properly, select ** Publish ** and the deployment will start. (Basically it can be left as it is) 6.png

At the management portal [App Service] ➡️ [Web App] ➡️ [Overview] ➡️ [URL] last.png

If you click on the URL and look at it in your web browser, you can see the Django Web App you created earlier as shown below. 7.png

Recommended Posts

Deploy a Django app made with PTVS on Azure
Deploy a Python 3.6 / Django / Postgres web app on Azure
Create and deploy a Django (PTVS) app using Azure Table storage
Deploy a Django application on Google App Engine (Python3)
Deploy a Django application with Docker
Implement a Django app on Hy
How to deploy a web app made with Flask to Heroku
Deploy a Django application on EC2 with Nginx + Gunicorn + Supervisor
Azure table storage with PTVS Flask app
A simple RSS reader made with Django
Deploy the Django app on Heroku [Part 2]
Deploy the Django app on Heroku [Part 1]
How to deploy a Django app on heroku in just 5 minutes
A note on enabling PostgreSQL with Django
I made a WEB application with Django
Deploy a Python app on Google App Engine and integrate it with GitHub
Until you publish (deploy) a web application made with bottle on Heroku
How to develop a cart app with Django
Build a flask app made with tensorflow and dlib to work on centos7
Create a Todo app with Django REST Framework + Angular
Looking back on creating a web service with Django 1
How to deploy a Django application on Alibaba Cloud
I made a net news notification app with Python
Create a Todo app with the Django REST framework
Create a Todo app with Django ③ Create a task list page
Looking back on creating a web service with Django 2
Deploy an existing app with docker + pyenv-virtualenv + uwsgi + django
Launch Django on a Docker container with docker-compose up
Create a Todo app with Django ⑤ Create a task editing function
Deploy a real-time web app with swampdragon x apache
Deploy a web app created with Streamlit to Heroku
Web App Development Practice: Create a Shift Creation Page with Django! (Experiment on admin page)
Deploy masonite app on Heroku 2020
Build a bulletin board app from scratch with Django. (Part 2)
Create a Todo app with Django ① Build an environment with Docker
When I deploy a Django app with Apache2 and it no longer reads static files
Web App Development Practice: Create a Shift Creation Page with Django! (Shift creation page)
Deploy your Django application on Heroku
I made a fortune with Python.
Django Tips-Create a ranking site with Django-
Twitter posting application made with Django
Creating a simple app with flask
Deploy Flask app on heroku (bitterly)
Run python3 Django1.9 with mod_wsgi (deploy)
Build a web application with Django
Deploy the Flask app on Heroku
Make a scraping app with Python + Django + AWS and change jobs
Make a filter with a django template
Deploy the Flask app on heroku
Launched a web application on AWS with django and changed jobs
I made a daemon with Python
Create a file uploader with Django
Until you deploy a SpringBoot project in Gradle on App Engine Flexible
Web App Development Practice: Create a Shift Creation Page with Django! (Introduction)
[Django] I made a field to enter the date with 4 digit numbers
Build your Django app on Docker and deploy it to AWS Fargate
Create a Todo app with Django ④ Implement folder and task creation functions
I made a webAPI! Build environment from Django Rest Framework 1 on EC2
Your own Twitter client made with Django
Deploy flask app with mod_wsgi (using pipenv)
Play like a web app with ipywidgets