Summary of the first week of operation and maintenance development openstack (account information):

Operation and maintenance development is based on the blue whale of Iaas, using python as the development language, combining angularJS+django framework, mysql as the database. Step 1: get the framework template (system get from Blue whale smart cloud Enterprise Edition -->Developer Center > template acquisition) Step 2 ...

Posted by btherl on Sun, 15 Dec 2019 12:23:31 -0800

Django xadmin custom widget plug-in (display style of custom detail page fields)

Sometimes we want to modify the display mode of xadmin detail page fields. For example, django's default ImageField displays the image url in the background, and we prefer to see the image thumbnail. For example, django displays many to many fields as a drop-down box or a left and right selection column, showing the two kinds of fields to the i ...

Posted by ben2468 on Sun, 15 Dec 2019 05:51:41 -0800

DjangoRestFramework Learn Two of Serialization Components, View Components

A serialized component First let's create some api interfaces according to the restful specification. Write as follows: Courses --- GET ---> View Data ---> Return to all data lists [{}, {},] Courses---POST--->Add Data--->Return Added Data{} Courses/1 - PUT--->Update pk=1 data--->Return updated data{} Courses/1 --- DELETE ---&g ...

Posted by phil88 on Sat, 14 Dec 2019 19:42:07 -0800

docker runs python web Services

Create the simplest python+django project and run it in the docker container. Environmental Science: In 192.168.174.134 server docker image: python:2 (python2.7.15) django: 1.8.31. Create python project in 134 server django-admin startproject ops python manage.py migrate Create a root user python manage.py createsuperuser root@u ...

Posted by jeffery on Sat, 14 Dec 2019 09:03:10 -0800

The contentType table that comes with Django for Django learning

Using django's contentType table, you can find a simple process where there are multiple foreign keys in a table: From: https://blog.csdn.net/aaronthon/article/details/81714496 contenttypes is an application built into Django that tracks the corresponding relationships between all apps and model s in a project and records them in the ContentTyp ...

Posted by microbluechip on Thu, 12 Dec 2019 18:19:11 -0800

Django Learning Files Upload and Download

That's six steps to upload! I. Configuration in settings configuration file MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'medias').replace('\\', '/')#media is the root path for picture upload 2. Configuring in url routing urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^index/', views.index,name='index'), ] + stati ...

Posted by BandonRandon on Wed, 11 Dec 2019 17:40:37 -0800

AJAX and from upload file example [django project]

Project brief This Django project is a test case project for learning tests. Three ways to upload Django files (form, jQuery+jQuery.ajax, native JS + native ajax) are used as the upload function examples file Interpretation of documents form_upload.html form upload file static page jquery_ajax_upload.html jQuery+jQuery.ajax upload file ...

Posted by matt_wood87 on Tue, 10 Dec 2019 17:10:56 -0800

Django development environment preparation

Environmental installation Foreplay Basic knowledge needed: Network configuration: Reference resources Share path: Reference resources Required software & Image VirtualBox: the best free virtual machine software The download address is as follows (install the software suitable for your own operating system): https://www.virtualbox.org/w ...

Posted by omanush on Mon, 09 Dec 2019 15:55:55 -0800

python3 django page addition, deletion, modification and query

Previous articles Python3 Django admin initialization background management project (mysql) Python3 Django admin add business module, multi field search Based on the blog module in the django project of the above article, make a custom crud page for the article Page template Create a new directory templates in the root directory of the projec ...

Posted by cjdesign on Sun, 08 Dec 2019 00:32:22 -0800

Development of django - configuration and use of mongodb

Today, I sorted out how to use mongodb in django project. The environment is as follows:ubuntu18.04, django2.0.5, drf3.9, mongoengine0.16 Step 1: configure mongodb and mysql in settings.py as follows (you can use both mysql and mongodb): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # database engine 'NA ...

Posted by nimbus on Sat, 07 Dec 2019 05:53:20 -0800