In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to use Django and Bootstrap to achieve calculators, I hope you will learn something after reading this article, let's discuss it together!
Preparatory work
Create an application
Add apply to configuration
Create a html
Write a view function
From django.shortcuts import render# Create your views here.def home (request): return render (request, 'index.html')
Configure routin
From django.contrib import adminfrom django.urls import path,includefrom app.views import homeurlpatterns = [path ('admin/', admin.site.urls), path (', home,name='hoome'),]
Import Bootstrap front-end framework
Download address
Copy css, fonts, js to the static folder. If not, create the folder.
Write frontend content {% load static%} Calculator body {background-position: center 0; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;-webkit-background-size: cover;-o-background-size: cover;-moz-background-size: cover -ms-background-size:cover;} .input _ show {margin-top: 35px; max-width: 280px; height: 35px;} .btn _ num {margin:1px 1px 1px 1px; width: 60px;} .btn _ clear {margin-left: 40px Margin-right: 20px;} .extenContent {height: 300px;}
8 /
5 *
2-
00 +
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.