0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

djangoメモ

0
Posted at

views.pyの書き方

views.py
from django.http import HttpResponse


def helloworldfunction(request):
    returnobject = HttpResponse('<h1>hello world</h1>')
    return returnobject
urls.py
from django.contrib import admin
from django.urls import path
from .views import helloworldfunction

urlpatterns = [
    path('admin/', admin.site.urls),
    path('helloworld/', helloworldfunction),
]
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?