Management file and urls file in Django
1. django-admin command
Enter django-admin at the command prompt to view subcommands
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
runserver
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset ...
Posted by miro on Fri, 26 Apr 2019 20:48:36 -0700
Flask Framework from Initial to Proficient Model Migration Operations
Knowledge points:
1. Model migration
I. General Situation
During the development of Django framework, we add or delete database fields, modify model classes directly, and then migrate them. It is very convenient. We also want Flask framework to support such operations, we need to use Flask-Migrate extensions to achieve data ...
Posted by novicephp on Tue, 23 Apr 2019 14:18:34 -0700
What is Pjax and why do you recommend it?
What is pjax?
Now many websites( facebook, twitter ) All support such a way of browsing, when you click on a link in a site, it is not a page jump, but just a site page refresh. This user experience, compared to the whole page flashing,
It's much better. Among them, there is an important part. These websites'ajax refresh supports the ...
Posted by wafawj on Sat, 20 Apr 2019 15:30:35 -0700
Django 1.10.x I18N internationalization
Official text: https://docs.djangoproject.com/en/1.10/#internationalization-and-localization
The purpose of internationalization and localization is to display web pages for different users in the language and format they are most familiar with.
Django can perfectly support text translation, date, time and number formatting, and time zone.
I ...
Posted by owaring on Thu, 18 Apr 2019 18:03:34 -0700
flask framework + pygal+sqlit3 build graphical business data analysis platform
I. Preface
Let's start with the main framework and features of the main graphics libraries: (personal opinions)
Django: python develops a heavyweight web framework, which integrates MVC and ORM technologies. It was designed to make it easy to develop complex, database-driven websites. However, for various reasons, few enterprises use it t ...
Posted by bow-viper1 on Fri, 12 Apr 2019 13:18:31 -0700
Running DJango on IOS
Django is python's web framework, which can be used to build websites or as a backstage for web applications. Usually Django is started from the command line. Using DJango in ios needs to start from the program through code. In addition, DJango needs a certain time to start. After starting, it needs to notify the interface thread.
1. Install D ...
Posted by allyse on Thu, 11 Apr 2019 17:18:31 -0700
Using Django haystack to integrate solr to write search engines (1)
1. Environmental configuration
This is very important! Please look carefully! Because of the mismatch of versions, Benbo spent a day on debug. Although the interface of solr 5.0.0 is good, it is incompatible with haystack, which was verified by debug of the trampler. There is such a comment in solr_backend of haystack source code:
Later, Ben ...
Posted by sungpeng on Mon, 08 Apr 2019 19:15:32 -0700
SQL Alemchy Performance Test
Recently, a project is being perfected. Because the display interface uses django, but wants to decouple. The backstage and display interface do not directly use django's ORM, so we use SQL Alemchy to do the database interface of back-end data collection. But the performance of SQL Alemchy is not good. Today, we want to test the bottleneck of ...
Posted by prowley on Sun, 07 Apr 2019 22:39:30 -0700
django celery redis practice
Environmental preparation
python3.5.4
windows redis
pip install celery
pip install redis
Start redirs server under windows
redis-server.exe redis.windows.conf
image.png
celery configuration
Project settings.py file modification:
# celery settings
# celery intermediary redis://redis service ip address: port/database num ...
Posted by stuckwithcode on Sun, 07 Apr 2019 19:33:32 -0700
Python Development [Django]: Composite Search, JSONP, XSS Filtering
Combinatorial search
When doing background blogging, you need to do different searches according to the type of articles.
1. Simple implementation
Associated documents:
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^index.html/$',views.index),
url(r'^article/(?P<article_type>\d+)-(?P<category> ...
Posted by nrussell on Mon, 01 Apr 2019 18:27:29 -0700