I'd like to split the frame in Django.

Asked 2 years ago, Updated 2 years ago, 65 views

The web page is being created. I divided the frame in HTML, but it didn't print out in django. So I asked, but django told me to divide it in urls and view, but I don't know what to do. Please tell me how to divide the frame left and right and make a menu button on the left and print it on the right.

django

2022-09-22 22:04

1 Answers

urls only for the main in the current warehouse.It seems that py and views.py are set up. The menu and lookup are called from the main, so if you enter the route, it must be processed in advance.

urls.Add the following to py to handle the path to localhost:8000/menu and lookup.

url(r'^menu/$', views.menu),
url(r'^lookup/$', views.lookup),

It will work if you add it to views.py as follows.

def menu(request):
    return render(request, 'as/menu.html')

def lookup(request):
    return render(request, 'as/lookup.html')


2022-09-22 22:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.