随笔分类 - Coding-Python
Data analysis
摘要:Python Async | Asynchronous IO Introduction Django async HTTP requests with asyncio and aiohttp
阅读全文
摘要:Ref: Learn Django Celery with RabbitMQ - Install and create new celery instance, Run a simple task Part 1 Ref: Learn Django Celery - Sending Emails wi
阅读全文
摘要:Nginx,uWSGI与Django 应用的关系 3.uWSGI + Nginx uWSGI 是性能极高的一个由C 编写的服务器,使用了自身独占的uwsgi 协议,这次让它配合Nginx 处理Django 的request,参数为4 进程 + 2 线程,性能立即直线商城,处理请求的成功率也基本在90
阅读全文
摘要:实现图片等其他资源的逐步加载。 Django Rest Framework for beginners 17 videos Last updated on Jul 20, 2021 Pagination Ref: Filtering, Searching, and Ordering. Django
阅读全文
摘要:除了教程中提到的,还要考虑S3上的问题。 Docker volumes Store persistent data. Volume we'll setup: /vol/web - store static and media subdirectories GET /static/media/file
阅读全文
摘要:Ref: https://www.udemy.com/course/django-python-advanced/learn/lecture/32236808#notes 104-109 Model Test Case def test_create_ingredient(self): """Tes
阅读全文
摘要:为下一步给 Ingredient 添加 Label API 做准备。 Model test_models.py def test_create_tag(self): """Test creating a tag is successful.""" user = create_user() tag =
阅读全文
摘要:如何加快开发? 需要深度理解。 Ref: Django的DRF(二):APIView(一级视图)、GenericAPIView(二级视图)、三级视图、ViewSets(视图集)、Router(路由) 一.APIView(一级视图) DRF的APIViews官网:https://www.django-
阅读全文
摘要:Recipe, Tag, Ingredients 三者的关系? 背景知识 75. Recipe API design 76. APIView vs Viewsets 从 Test Case 开始 Test Case + Model Implementation Write test for reci
阅读全文
摘要:Section 12, Build User API 基本流程 Test from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse f
阅读全文
摘要:计算两个坐标之间的距离:PostGIS教程十二:地理 模型的坐标格式:python - GeoDjango:如何获得两点之间的距离?
阅读全文
摘要:Flask 调用 Ref: [Advanced Python] Flask model to DB by SQLAlchemy 再看一个纯Python调用SQLAlchemy的方案。 psycopg2 模块 直接调用 SQL 的方法,而不是 ORM。 import psycopg2 # databa
阅读全文
摘要:衔接:[Mobilar] 07 - REST API for Photo Mgt Ref: Django REST Framework Views - ViewSets【非常不错,有结构图】 FQA 权限问题 Ref: giving "CSRF Failed: CSRF token missing
阅读全文
摘要:GeoDjango intends to be a world-class geographic Web framework. Its goal is to make it as easy as possible to build GIS Web applications and harness t
阅读全文
摘要:空间数据库原理与PostGIS应用【教学视频,较详细、科班】 RDS with PostGIS PostGIS is an extension to PostgreSQL for storing and managing spatial information. If you are not fam
阅读全文
摘要:Ref: PostgreSQL入门,小马视频 一、安装 psql --version psql (PostgreSQL) 10.16 (Ubuntu 10.16-0ubuntu0.18.04.1) 端口查看: $ nmap 12
阅读全文
摘要:相似问题:Wagtail: Creating a custom API endpoint 在Wagtail中,rest api相关,叫做 API endpoint。 相关资源: Wagtail API - how to customize the detail URL Wagtail API v2
阅读全文
摘要:本篇章,为 [Wagtail] 01 - Headless CMS 的扩展。 Ref: https://www.django-rest-framework.org/api-guide/authentication/ API Reference BasicAuthentication TokenAut
阅读全文
摘要:黑马程序员:Python面向对象 封装、继承和多态 一、Encapsulation 类的自我介绍 <class name>.__doc__ def __str__(self) __del__ 与 生命周期 也属于 双下划线,所以也是“privite”。 __init__ __del__ del <o
阅读全文
摘要:Ref: Python3 Advanced Tutorials,视频系列,若干问题。 Ref: Advanced-Python-Tutorial,github教程,作为补充。 一、Template String Template 属于 string 中的一个类。 from string import
阅读全文