Skip to content
A pluggable Django forum APP
JavaScript CSS Python HTML
Branch: master
Clone or download
Pull request Compare This branch is 12 commits ahead of ericls:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
niji
.gitignore
.travis.yml
LICENSE.txt
MANIFEST.in
README.md
setup.py

README.md

NIJI

Build Status Documentation Status

Django-NIJI is a pluggable forum app for Django projects.

Demo

https://demo.nijiforum.com/

Docs

http://django-niji.rtfd.io

说明

源作者仓库是插件形式使用,新手研究学习不太会跑起来,所以fork下来,自己瞎搞了一下,可以在 Pyhton3.7 + Django 2.2.2 上运行。

示例

技术论坛 - https://iHTCboy.pythonanywhere.com

Run

1、cd到niji文件夹下(requirements.txt文件目录下),创建项目的虚拟环境:

virtualenv venv -p python3

2、激活venv环境:

source venv/bin/activate

3、安装 requirements.txt 运行环境依赖

pip install -r requirements.txt

4、创建数据库模型(ORM)

生成应用程序模型:

python manage.py makemigrations

迁移模型到数据库:

python manage.py migrate

5、 Admin 管理工具 可以通过网站链接后面增加admin,即 http://yoursite/admin/ 访问管理后台

管理后台需要密码才能访问,通过下面命令创建超级用户:

python manage.py createsuperuser

输入命令后,会提示输入用户名(区分大小写),邮箱(方便django邮件通知管理员),密码(不能设置太简单!),大概如下:

Username (leave blank to use 'niji'): HTC
Email address: ihetiancong@gmail.com
Password:
Password (again):
Superuser created successfully.

6、django自带了一个简单的网络服务器。在开发过程中非常方便,通过执行命令来运行:

python manage.py runserver
  • 注1:此命令需要在激活venv环境里执行,因为项目环境配置在venv环境下。
  • 注2:此命令后面也可以带参数:IP地址和端口号 python manage.py runserver 172.0.0.1:1024

7、运行成功后,浏览器打开 127.0.0.1:1024 就可以访问

System check identified no issues (0 silenced).
June 29, 2019 - 09:13:51
Django version 2.2.0, using settings 'settings'
Starting development server at http://172.0.1.1:1024/
Quit the server with CONTROL-C.
You can’t perform that action at this time.