installation is successful, you can enter Python in the command window to query, such as the display of the following figure of information to indicate success
Second, Django installation
Pip install Django
or
python setup.py install
Second, pycharm installation
Download the website or download the link below
Link: Https://pan.baidu.com/s/18Vh-Lmx-2QXQeOjIe
introduced the output of RSS, in fact, RSS is a very good thing, but the problem here is that the general content is the core of a site, provided that the RSS, users or other sites are able to subscribe to view without looking at advertising and other information, this is not the site webmaster is willing to see, so, This technology has not been a very good application at home. Interested students here can continue to see the http://djangobook.py3k.cn/2.0/chapter13/here
Recently participating projects require the use of Django as a framework, so recently began to do the corresponding study, in the blog record this process. There are three common methods of installation on the Internet:1. Download via PIP.2. Download via Easy_install.3. Download the compressed package directly to the official website.Of course, the premise of installation is that the computer has been configured with Python.I took the third method, do
})Temporary detail.html:# polls/templates/polls/detail.html{{Question}}The above code returns a 404 error when the question object is not found, and can be processed at once using the get_object_or_404 () function.From django.shortcuts import get_object_or_404, renderfrom polls.models import question# ... def detail (request, Question _ID): question = get_object_or_404 (question, pk=question_id) return render (Request, ' polls/detail.html ', {' Question ': question})This allows the test to
Use the Python web. py framework to implement a query tutorial similar to Django's ORM, web. pydjango
Query objects in Django
The Django framework comes with an ORM that provides powerful and convenient query functions. These functions are irrelevant to tables. For example:
class Question(models.Model): question_text = models.CharField(max_length=200) pub_date
This article mainly introduces the web using Python. the py framework implements a query tutorial similar to Django's ORM. the integrated ORM operation database has always been one of the most powerful functions of Python. This article will discuss how to use it on the web. for more information about the implementation of the py framework, see
Query objects in Django
The
Tutorial on customizing the 404,500 page using Django, django404
1. Create a project
django-admin.py startproject HelloWorld
Contains two files.
3. Modify settings. py
(1 .) DEBUG to False, (2 .) ALLOWED_HOSTS Add the specified domain name or IP address, (3 .) specify the template path 'dirs': [OS. path. join (BASE_DIR, 'templates')],
# SECURITY WARNING: don't r
Writing_first_django_app_part6In Django, some of the additional files in the Web application, such as image, JS, CSS, etc., are called static files "static file"Django.contrib.staticfiles: collect static files from each application and put them in a separate location for easy use and managementUsing CSSStatic file lookup path when the same as template, first in the polls directory to create a directory static, in the inside to create a polls directory
Development environment with To do List1: Home: localhost/pd/2: Navigation bar test or life point into:Test: localhost/category/?cid=13: Click on the article to enter the article display pageE.g: Enter the article 7:localhost/article/?id=74: Right Sidebar article sub-document interface;e.g:2015,10 Archive: localhost/archive/?year=2015month=105: Browse rankings and comments etc. just click to jump to the corresponding article page.The main purpose of each page is to list the corresponding URL to
Mysql and php dynamic website development tutorial, mysql website development. Mysql and php dynamic website development tutorials. mysql website development tutorials start from forms, because forms can clearly display the interaction between databases and the web. Mysql an
1. Plan the website. This tutorial uses the figure below as an example to build the website.It consists of five parts:1. Main NavigationNavigation bar with button effects. Width: 760px Height: 50px2. HeaderThe website header icon, which contains the website logo and website
Mysql and php dynamic website development tutorial, mysql website development
The tutorials in this series start with the form, because the form can clearly display the interaction between the database and the web. Submit a form to record registration information in the database.This tutorial is a basic
Tutorial on the official website of RabbitMQ --- route, official website of rabbitmq --- route
(Use python client pika 0.9.8)
In the previous tutorial, we built a simple log system. We can broadcast log messages to many recipients.
In this tutorial, we will add a feature to
Website host tutorial and host tutorial
Chen kichao
1. host provider
Select your provider, such as hichina, xinnet, chinanetcenter, and Western Digital.
Domain Name, space, website, Record Filing2. Domain Name
The domain name you want to register
Www.chenkezhao.com3. Determine the disk space and traffic required for h
CSS webpage layout tutorial 9: Design website navigation with CSS-horizontal navigation website navigation is the most important element of a website, it is the most direct and convenient tool for users to access website content. Website
($_request[' Age ')]) { echo 'You forget type your age;'; # code ... $error= ' 3 ';} Else { $a=$_request[' age '];} if (empty($error)) { echo'Everything is OK'; # code ... require (' connect/mysqli_connect.php '); $q= "INSERT into user (First_name,second_name,age) value ('$f', '$s', '$a')"; $r=@mysqli_query($dbc,$q);}? >View CodeThe mysqli_connect.php file under connect in the same directory.Inside is
$dbc =@mysqli_connect(localhost,root,123,test);? >View CodeThere should also be a hea
Website construction tutorial (7): SQL Elementary tutorial tip: SQL is a standard computer language for accessing and processing databases.
SQL is a standard computer language used to access and process databases.
Use SQL to manage dataStructured Query Language (SQL) is a standard language used to Access databases, including SQL Server, Oracle, MySQL, Sybase, an
components, in addition to complete a set of permissions system, we will lead you to see how to have two rights control system in a project, and control two systems in the route. Next, the left sidebar menu in the background shows different menus depending on the permissions. This is also done through the permission system plus the menu component on the left sidebar. ...The 16th chapter of Special Management moduleThe focus of this chapter is to lead you through the management of thematic modul
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.