manage.py startapp btest
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'btest.apps.BtestConfig',
]
from django.http import HttpResponse
def index(request):
return HttpResponse("Привет, программист! Это твое первое приложение. Поздравляем!")
from django.urls import path
from .views import index
urlpatterns = [
path('', index),
]
from django.contrib import admin
from django.urls import path
urlpatterns = [
path('admin/', admin.site.urls),
]
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('btest/', include('btest.urls')),
path('admin/', admin.site.urls),
]