Answer the question
In order to leave comments, you need to log in
How to show the site itself in the view?
Let's say there is a function that returns text with the word "Test":
def index(request):
return HttpResponse("<h1>Тест</h1>")
from django.conf.urls import url
from django.contrib import admin
from shop import views
urlpatterns = [
url(r'^test/', views.index),
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question