随笔分类 - django
摘要:code from django.db import models import django.utils.timezone as timezone class Doc(models.Model): add_date = models.DateTimeField('保存日期',default = t
阅读全文
摘要:cat /etc/nginx/nginx.conf # For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Rus
阅读全文
摘要:code uwsgi_param QUERY_STRING $query_string; uwsgi_param REQUEST_METHOD $request_method; uwsgi_param CONTENT_TYPE $content_type; uwsgi_param CONTENT_L
阅读全文
摘要:code #coding=utf-8 from django.shortcuts import render from django.http import HttpResponse from django.core.paginator import Paginator,EmptyPage,Page
阅读全文
摘要:code response = HttpResponseRedirect(redirect_to=book.book_url) return response
阅读全文
摘要:code macname@MacdeMBP ibook % python3 manage.py makemigrations Migrations for 'booklist': booklist/migrations/0022_auto_20200505_1224.py - Remove fiel
阅读全文
摘要:code macname@MacdeMBP ibook % python3 manage.py shell Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Ty
阅读全文
摘要:code from django.http import HttpResponse import json def test(request): result = {"status":"错误","data":"","city":"北京"} #json返回为中文 return HttpResponse
阅读全文
摘要:code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="ko" lan
阅读全文
摘要:code from .models import UserProfile from django.contrib.auth.hashers import make_password user_profile = UserProfile() user_profile.username = userna
阅读全文
摘要:code 安装完成后可uwsgi --version查看版本, uwsgi --python-version还可以间接查看到python的版本。
阅读全文
摘要:#old /usr/bin/uwsgi -> /usr/local/python3/bin/uwsgi code #安装uwsgi 1069 wget http://projects.unbit.it/downloads/uwsgi-latest.tar.gz 1072 tar -xvf uwsgi
阅读全文
摘要:code pip3.7 install django-extensions pip3.7 install django-werkzeug-debugger-runserver pip3.7 install pyOpenSSL #制作ssl证书 openssl genrsa -des3 -passou
阅读全文
摘要:问题描述: 在阿里云的自带centos上运行python manage.py runserver的时候报错: django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).
阅读全文
摘要:不转义 var lyric ={{lyrics| safe}};
阅读全文
摘要:text/html(默认的,html文件) text/plain(纯文本) text/css(css文件) text/javascript(js文件) application/x-www-form-urlencoded(普通的表单提交) multipart/form-data(文件提交) appli
阅读全文
摘要:settings.py #LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'zh-hans' #TIME_ZONE = 'UTC' TIME_ZONE = 'Asia/Shanghai' USE_I18N = True USE_L10N = True USE_TZ =
阅读全文
摘要:首页 详情页 github地址: https://github.com/fusu192/movieweb
阅读全文
摘要:首页 登陆账号: 41110102 密码: 123456 项目地址: https://github.com/fusu192/lessons
阅读全文
摘要:注释如下代码
阅读全文