Day 58: getting started with Web development Django

by Aurora Today, I'd like to introduce Django, another web development framework of Python. It is an open-source Web application framework customized based on python. It originated from an online news web site at first, and then opened up in 2005. Django has large and comprehensive functions. It provides a one-stop solution, which allows devel ...

Posted on Sun, 31 May 2020 23:11:44 -0700 by captainplanet17

Python beginner's prerequisite: do you understand metaclasses?

Class is also an object Before you understand metaclasses, you need to master the classes in Python. The concept of classes in Python is a bit strange in light of Smalltalk. In most programming languages, a class is a set of code snippets that describe how to generate an object. This is still true in Python: >>> class ObjectCreator(obj ...

Posted on Mon, 18 May 2020 02:07:56 -0700 by RyanSmith345

django rest framework quick start tutorial

Django REST framework is a fast and flexible django plug-in, which is very convenient to build web API Official website link Key points of this chapter How to prepare a project (create a test environment, install django/restframework, etc.) Write seriallizer/view/url Configure restframe work test Prepare the project mkdir tutorial cd tutorial ...

Posted on Thu, 14 May 2020 08:57:09 -0700 by alsouno

Django Configure a separate domain name for each App

Environment: Python 3.8.1 + Django 2.2.12 To integrate process specifications, integrated projects including task, doc, sso are deployed. Approximate directory structure: CellMiddle -- Project Root Directory - task - demand system │ ├─migrations │ ├─static │ └─templates - logs - Log directory -doc - Document System │ ├─data │ ├─migrat ...

Posted on Fri, 08 May 2020 10:54:19 -0700 by leegreaves

django -- Celery implements asynchronous and timed tasks

1. Environment python==2.7 djang==1.11.2 # 1.8, 1.9, 1.10No problem celery-with-redis==3.0 # redis needs to be used as an intermediary service (Broker) celery==3.1.25 # Installing the above will install automatically kombu==3.0.37 billiard==3.3.0.23 django-celery==3.2.2 # Cellery plug-in, to achieve timed task ...

Posted on Sun, 03 May 2020 23:20:52 -0700 by scheols

django processing dynamic publishing of multiple image URLs

The back end is django There is a way to handle a set of picture URLs. A dynamic is not with many pictures. If the database uses urlfield, only one url can be saved. So I save a set of URLs as a js array, and then pass them in with json, and save them in charfile. When reading them, I need to do a processing. With a us ...

Posted on Sat, 02 May 2020 10:27:26 -0700 by jkeppens

Django 2.0.1 development framework building

1. Create a blank django project using vs2017 2. Right click env of python environment - install python package and upgrade django to 2.0.1 and setuptools to 38.4.0. The specific environment is as follows: 3. Configure the routing configuration file urls.py, uncomment admin, and modify it as follows. The configuration of Django 2.0 is dif ...

Posted on Thu, 30 Apr 2020 06:30:00 -0700 by ryansmith44

Django Channel real time push and chat

Let's take a look at the final effect   Start chatting, input message and click send message to start chatting       Click "get back-end data" to start real-time push Let's take a brief look at Django Channel Channels is a project that uses Django and extends its functions beyond HTTP to handle WebSocket, chat protocol, IoT protoc ...

Posted on Wed, 29 Apr 2020 17:44:34 -0700 by cdog5000

Django development document - domain user integrated login

Project Overview: Generally in enterprises, users are managed uniformly by WINDOWS domain users, so applications developed rapidly by Django have to integrate AD domain login. Generally, django-python3-ldap library is used for integrated login on the Internet, but the function of domain User login and site User login is needed in this scheme. S ...

Posted on Tue, 21 Apr 2020 23:42:14 -0700 by drewbee

Pycharmimplementation (Django's model, forms, management tools, introduction of static files)

1, Django model (PyCharm Implementation) Django provides good support for various databases, including PostgreSQL, MySQL, SQLite and Oracle. Django provides a unified calling API for these databases. We can choose different databases according to our business needs. Mysql is the most commonly used database in Web applications. In this chapter, ...

Posted on Sat, 18 Apr 2020 10:05:03 -0700 by sanam