The teaching of using graphics and text in Django background management system


Checking the configuration file of Django background management system

Check root file

Start the project, enter IP port / admin in the browser, for example: enter

Registration background management system super management

1. Create ා create a normal user with clear password (not recommended)
2.create_ User ා create a normal user, password ciphertext (recommended)
3. Createsuperuser ා create super user (recommended)
#Command statement
python createsuperuser
Username (leave blank to use ‘7981 Python’): root ා use ‘7981 Python’ by default
Email address: optional email address
Password: ා minimum 8 digits, cannot be a pure number / character
Password (again): ා confirm the password and input it again
Superuser created successfully

Login account and password

Add database table to background management system for simple view

Set background management system, field value can be empty

Note: the effect of setting the field value of the background management system to null is to write a null string in the database. Generally, blank = true and null = true are used together to prevent data errors from modifying the field display name of the background management system

Set whether a field can be modified by background management system

Prompt to fill in field value information

Set field value options that can be modified by background management system

Modify table name information

Use of rich text editor

#Rich text editor function: write beautiful, formatted text information
1. Install the module
– pip3 install django-tinymce==2.6.0

Two Profile installed_ Apps add editor application
‘TinyMCE’, register rich text editor

3. In Add edit configuration to
‘theme’: ‘advanced’, rich text function
‘width’: 600, width
‘height’: 400, height

4. Root Configure URL in (to use routing distribution)
urlpatterns = [

5. For the application in models, you can register to use admin

The above is all the knowledge content of this introduction. If you have any questions, you can contact the developer editor.

Recommended Today

Apache sqoop

Source: dark horse big data 1.png From the standpoint of Apache, data flow can be divided into data import and export: Import: data import. RDBMS—–>Hadoop Export: data export. Hadoop—->RDBMS 1.2 sqoop installation The prerequisite for installing sqoop is that you already have a Java and Hadoop environment. Latest stable version: 1.4.6 Download the sqoop installation […]