• Django 2.0 – creating the first Django application – Part 1


    Development steps of general Django network program Configuration development environment Initialize project Start development server Create application Create View Configure routes to view Configure project development environment To develop a new project, the first step is to configure the development environment of the project. Here we use two configuration tools of Python development environment Pyenv: […]

  • Simple blog system based on Django


    Clean Blog A blog system based on Django: Python 3.6 and Django 1.10 MySQL storage scheme Xadmin background management Ckedit editor, image upload Bootstrap front end template RSS subscription Label classification and date filing Article review Haystack article content search home page Details page Commentary published File Xadmin backstage Ckedit article editor Picture upload

  • Django model


    M in MTV represents model model, Django model is the description of data in database using Python code, is the structure of data, and is equivalent to create table statement in SQL. Understanding ORM ORM: object relational mapping. ORM is an important part of Django. The MVC framework includes an important part, orm. It realizes […]

  • Django view


    The V in MTV represents the view view. The view receives the web request and returns the Web response. The view is a python function defined in view.py. The response result can be the HTML content of a web page, a redirection, etc Configure urlconf In the settings.py file, specify the configuration of root level […]

  • CentOS 7.2 environment building record (Chapter 4: Python environment configuration)


    Chapter 4: Python environment configuration Using environment tools Python environment tools Python 2.7.5 ා python2 version, built in the system PIP 9.0.1 (python2 version), python toolset, compilation and installation Virtualenv 15.1.0 – python2 version virtual environment dependency, PIP installation Virtualenvwrapper 4.8.2 – used with virtualenvwrapper, PIP installation Setuptools 38.5.1 – Python toolset, compile and install […]

  • High performance ten million level timed task management service for sun


    Forsun’s high-performance and high-precision timing service makes it easy to manage ten million level timing tasks.Project address: https://github.com/snower/forsun The timer of Linux system is used to provide the timing schedule to the second level, and the long-time operation ensures no error. It supports local memory storage and redis persistent storage. With redis, tens of millions […]

  • Implementing multi select dropdown with semantic UI in Django


    How to implement jsondata autoupdating multi select dropdown with semantic UI in Django projectBased on version: pyton 3.6, Django 2.0, semantic 2.2 demand Because individuals are more inclined to semantic UI, and there are more knowledge points involved, including Django’s template, template tag, the style in semantic UI, and part of jQuery, so write it […]

  • Solve the problem that sudo can’t be used to enhance permissions in the python virtual environment virtualenv


    Solve the problem that sudo can not be used to enhance permissions in Python virtual environment Problem description In the virtual environment, sudo elevation permission is required to execute some commands, which will cause the command to exit the virtual environment: If you start the Django service, you need to listen to port 80: $: […]

  • Python, Linux, front end, short knowledge summary in practice (entry level) (long-term update)


    1.sqlalchemyDo not bring table updateThe official migration tools are mainlyalembicandsqlalchemy migrateIf you do not use the tool, you can update the model by creating a new tablesqlalchemyOfcreate_allMethod: to modify a table field, you can only manually modify it in the database and update the model at the same time.In addition, SQLiteshellLower executionsqlThe way to script […]

  • Django-01, get to know Django and build Django HelloWorld


    1. Introduction to Django 1.1 sources of Django Django is an open source web application framework written by python. The framework mode of MVC is adopted, i.e. model M, view v and controller C. It was originally developed to manage some news content based websites of Lawrence publishing group, namely CMS (content management system) software. […]

  • Preliminary experience of Django project configuration (I)


    Preface It is recommended to use virtualenv to create a python virtual environment to prevent version conflicts caused by the global dependency of PIP installation. Pycharm will generate one by defaultvenvDirectory and create a virtual environment. The virtual environment will also be activated by default using the terminal provided with the IDE The tutorial used […]

  • Simple interaction between Django model view templates (2)


    Preface Next, the previous article mainly deals with the basic configuration of Django project. This article mainly deals with the ORM related to database, that is, the use of model in Django, and the interaction among three layers of mvt The tutorials are basically pieced together to prevent some things from being inaccurate, because I […]