1 Star 2 Fork 2

武松 / simple_cms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

simple cms

手机版URL:

localhost:8000/mobile

PC版URL:

localhost:8000

初始化项目

git clone git@github.com:newpanjing/simple_cms.git

安装依赖包

pip install -r requirements.txt

配置数据库

找到项目中的settings.py文件,替换数据库的host和用户名密码,在执行以下步骤

执行迁移

生成迁移文件

python manage.py makemigrations

执行迁移

python manage.py migrate

创建超级用户

python manage.py createsuperuser

启动查看

python manage.py runserver 8000

访问地址

前台地址

http://localhost:8000

后台地址

http://localhost:8000/admin

用户名密码创建步骤请看:创建超级用户

API接口

API接口地址

广告位说明

AD

数据库配置文件

simple_cms/config.py

手机版和PC版配置

nginx 配置文件:


   server {
      listen 80;
        server_name 56bird.cn;
        root html;
        rewrite ^(.*)$  http://www.56bird.cn$1 permanent;
    }

   server {
        listen 80;
        server_name www.56bird.cn m.56bird.cn;
        charset utf-8;
        location /favicon.ico {
            expires 30d;
            root /data/www/56bird_cn/static/;
        }
        location /static {
           expires 30d;
           root /data/www/56bird_cn/;
        }
        location / {
                proxy_pass http://127.0.0.1:8001;
                 proxy_read_timeout 300;
                        proxy_set_header   Host             $host;
                        proxy_set_header   X-Real-IP        $remote_addr;
                        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
    
        }
   }

启动

进入根目录

  1. 创建虚拟环境
virtualenv venv    

如果没有virtualenv 命令请先安装 pip install virtualenv 或用apt和yum:apt-get install virtualenv,yum install virtualenv -y
2. 进入虚拟环境

source venv/bin/activate
  1. 安装依赖包
pip install -r requirements.txt
  1. 运行根目录start.sh
sh start.sh

域名

手机或者PC的域名在simple_cms/hosts.py文件中修改,随后nginx的配置文件也要修改

注意事项

本程序开放源码,但是不提供任何技术支持,有问题请自行百度。

MIT License Copyright (c) 2020 Jingle Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

不要star 不要fork 不要watch 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/tompeppa/simple_cms.git
git@gitee.com:tompeppa/simple_cms.git
tompeppa
simple_cms
simple_cms
master

搜索帮助