分类: 脚本语言
Python数据类型--整型
介绍:
在Python2.x中,整型使用符号整数类型(int)和长整数类型(long)来表示,是正或负整数,不带小数点。
 ……
Python 运算符
1、算数运算:
2、比较运算:
3、赋值运算:
4、逻辑运算:
5、成员运算:
二〇一八年四月十四日 10:35:52
Django 将多余数据表移除
原配置:
Python
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',……
Django 创建数据表不加APP前缀
Python
[root@site main]# vi models.py
from django.db import models
# Create your models here.
class admin(models.Model):
……
解决Nginx下Django无法加载CSS问题
问题:
在使用Nginx发布Django程序时,无法加载CSS及JavaScript
解决方法:
编辑/etc/nginx/conf.d/default.conf,添加以下内容
Shell
……
编写uwsgi服务
一、编写脚本
脚本如下(根据自己情况进行修改):
Shell
#!/bin/bash
# Comments to support chkconfig on Linux
# chkconfig: ……
MariaDB for Python
一 、安装MySQL-python
Shell
yum -y install MySQL-python
1
yum -y install MySQL-python
……
uwsgi: unrecognized option '--module'
问题:
Shell
[root@site one]# uwsgi --module one.wsgi --http :80
uwsgi: unrecognized option '--module'
getopt_long() error
……
Nginx+Django+Uwsgi配置
安装Django:地址
安装uwsgi:地址
安装Nginx:地址
一、配置uwsgi
将uwsgi目录放至与发布项目同级目录下,创建uwsgi文件夹及uwsgi.ini文件,配置如下(可根据情……
使用Yum源安装Nginx
一、设置 yum源
1.安装EPEL
EPEL(Extra Packages for Enterprise Linux)是由Fedora Special Interest Group维护的Enterprise Linux(RHEL、CentOS)中经 常用……