Basic index view created
This commit is contained in:
8
worldtour/asiatoursagency/urls.py
Normal file
8
worldtour/asiatoursagency/urls.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
from django.urls import path
|
||||||
|
from . import views
|
||||||
|
|
||||||
|
# Define a list of url patterns
|
||||||
|
urlpatterns = [
|
||||||
|
path('', views.index)
|
||||||
|
]
|
||||||
|
|
@ -1,3 +1,6 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
from django.http import HttpResponse
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
def index(request):
|
||||||
|
return HttpResponse("Asia Tours Agency")
|
||||||
|
@ -37,6 +37,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
'asiatoursagency.apps.AsiatoursagencyConfig',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
@ -15,8 +15,9 @@ Including another URLconf
|
|||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path
|
from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
|
path('', include('asiatoursagency.urls')),
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user