模型与数据库

Posted on 2023-01-19 in django • Tagged with django, models and databases

1. 利用模型执行数据库操作

一旦创建数据模型后,Django 自动生成一套数据库操作 API,可以执行创建、检索、更新 和删除操作。

为 …


Continue reading

Linux Shell Skills

Posted on 2023-01-22 in how-to • Tagged with linux, shell

如何查看 debian 包中的文件

dpkg -L packagename

What's the difference between /sbin/nologin and /bin/false ?

When /sbin/nologin is set as the shell, if user with that shell logs in, they'll get a polite message saying 'This account is currently not available.' This …


Continue reading

ReStructuredText 笔记

Posted on 2023-01-22 in how-to • Tagged with rst, ReStructuredText

ReStructuredText 学习笔记,如果发现没看懂,可以查看本文档的原始 reST 文档


Continue reading

将音频(视频)转录为文字

Posted on 2023-01-22 in how-to • Tagged with speech recognition

以下操作在 Windows 10 环境下

  1. 下载 Virtual Audio Cable。下载地址:https://www.vb-audio.com/Cable/index.htm

  2. 安装后,会生成了二个虚拟设备:CABLE Input 和 CABLE Output,并且被分别设 …


Continue reading

SSH 使用说明

Posted on 2023-01-22 in how-to • Tagged with ssh

安装 SSH

检查 SSH 是否安装:

$ apt list --installed | grep ssh
## 如果没有安装
$ sudo apt install openssh-client

如果已经安装,是否需要重新生成 SSH 服务器端钥匙? 如是批安 …


Continue reading

Linux Firewalls

Posted on 2022-06-19 in debian

第二章 包过滤概念

什么是防火墙?多年来,这个词的含义发生了变化。根据RFC 2647“防火墙性能基准术语”, 防火墙是“在网络之间 …


Continue reading

POSTGRESQL 学习

Posted on 2020-10-03 in how-to • Tagged with postgresql, database

安装配置 PostgreSQL

安装 postgresql 并登录至 postgres 用户环境

$ sudo apt install postgresql
$ sudo -i -u postgres
$ psql

创建角色以及数据库

>> CREATE ROLE demo_role LOGIN PASSWORD 'demo_password';
>> CREATE DATABASE demo_db WITH owner = demo_role;

默认安 …


Continue reading

在 DEBIAN 11 上安装 dotnet core 并启用 Serenity

Posted on 2022-05-02 in how-to • Tagged with serenity, asp.net core, dotnet core

本配置在 debian 11 下测试通过,默认环境为全新安装,仅安装 SSH, 创建了一个普通用户 recozo,该用户开启 sudo 功能。

参见:


Continue reading

基于 wagtail 创建网站应用

Posted on 2020-10-03 in django • Tagged with wagtail, django, postgresql, git

参考链接

系统运行环境配置

设置开发与运行环境,默认环境为全新安装,仅安装 SSH 和 基 …


Continue reading

Django 学习

Posted on 2022-01-01 in django • Tagged with django

1. Introduction to Django

Scaffolding a Django Project and App

常用命令:

$ django-admin.py startproject myprojectname .
$ python manage runserver
$ python manage startapp myappname

Model View Template

Models
Django models define the data for your application and provide an abstraction layer to SQL database access through an Object Relational …

Continue reading