Skip to content

Commit

Permalink
Merge pull request #217 from Ehco1996/dev
Browse files Browse the repository at this point in the history
dev2master
  • Loading branch information
Ehco1996 authored Mar 1, 2019
2 parents dac949d + ba9e06e commit 56733f8
Show file tree
Hide file tree
Showing 69 changed files with 3,378 additions and 2,808 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
ignore = E226,E302,E41
max-line-length = 88
33 changes: 13 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@

FROM python:3.6-slim
FROM python:3.6-alpine

LABEL Name=django-sspanel Version=0.0.2
LABEL Name=django-sspanel Version=0.0.3

COPY . /src/django-sspanel
COPY requirements.txt /tmp/requirements.txt

WORKDIR /src/django-sspanel
RUN apk update && apk add --no-cache gcc linux-headers \
musl-dev python3-dev mariadb-dev jpeg-dev && \
pip install --no-cache-dir -r /tmp/requirements.txt && \
apk del gcc linux-headers \
musl-dev python-dev jpeg-dev && \
rm -Rf ~/.cache

RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
python3-dev \
default-libmysqlclient-dev && \
pip install --no-cache-dir -r requirements.txt

EXPOSE 8080

# 如果是第一次运行需要手动exec进去执行如下命令
# python3 manage.py collectstatic --no-input && \
# python3 manage.py makemigrations && \
# python3 manage.py migrate --run-syncdb && \

# server
CMD uwsgi uwsgi.ini
# # 如果是第一次运行需要手动exec进去执行如下命令
# # python3 manage.py collectstatic --no-input && \
# # python3 manage.py makemigrations && \
# # python3 manage.py migrate --run-syncdb && \
30 changes: 0 additions & 30 deletions Pipfile

This file was deleted.

455 changes: 0 additions & 455 deletions Pipfile.lock

This file was deleted.

61 changes: 9 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,92 +7,49 @@ Telegram group : [invite link](https://t.me/Ehcobreakwa11)

Wiki: [Wiki](https://github.com/Ehco1996/django-sspanel/wiki)

**欢迎老板捐赠**

![](http://opj9lh0x4.bkt.clouddn.com/17-12-20/62343859.jpg)

## 重大升级说明
如果要升级到dev最新的代码
请按wiki里的步骤升级

https://github.com/Ehco1996/django-sspanel/wiki/%E9%87%8D%E5%A4%A7%E6%9B%B4%E6%96%B0%E6%AD%A5%E9%AA%A4

## 项目说明

该项目是用django作为后端框架,开发的一个shadowsocks多人用户面板,具有以下特点:

* 轻量级css框架
* 最新版本的Django作为后端
* 后端支援(shadowsocksr/shadowsocks)
* 注册采用邀请系统,告别不良用户
* 完善的商品购买逻辑
* 统一完善的后台管理界面
* 完善的商品购买逻辑
* 支付宝当面付模块
* 邀请返利系统
* 更多特性等待开发和探索....
* ...

## 预览图

**用户界面:**

* 注册界面:

![](http://opj9lh0x4.bkt.clouddn.com/18-1-20/21920210.jpg)
![](https://user-images.githubusercontent.com/24697284/53059324-5dfaf000-34f1-11e9-9454-a828237b263d.png)

* 用户首页:

![](http://opj9lh0x4.bkt.clouddn.com/18-1-20/44962964.jpg)
![](https://user-images.githubusercontent.com/24697284/53059228-12e0dd00-34f1-11e9-8b15-e832c182d010.png)


* 支持多种主题切换:

![](http://opj9lh0x4.bkt.clouddn.com/18-4-7/37704064.jpg)

* 节点信息:

![](http://opj9lh0x4.bkt.clouddn.com/18-10-15/57273903.jpg)
![](https://user-images.githubusercontent.com/24697284/53059231-13797380-34f1-11e9-8702-39c9063dd049.png)

* 流量查询:

![](http://opj9lh0x4.bkt.clouddn.com/18-1-20/23097796.jpg)


* 充值捐增:

![](http://opj9lh0x4.bkt.clouddn.com/18-1-20/84610707.jpg)

![](https://user-images.githubusercontent.com/24697284/53059233-14120a00-34f1-11e9-94f3-b2ca2ab88882.png)


**后台界面:**

* 后台首页:

![](http://opj9lh0x4.bkt.clouddn.com/17-10-25/23766206.jpg)

* 商品管理:

![](http://opj9lh0x4.bkt.clouddn.com/17-9-17/76575609.jpg)

* 节点管理:

![](http://opj9lh0x4.bkt.clouddn.com/17-9-17/12003054.jpg)
![](https://user-images.githubusercontent.com/24697284/53059234-14120a00-34f1-11e9-8937-ea56cf4077ed.png)


* Django-jet 后台:

![](http://opj9lh0x4.bkt.clouddn.com/18-4-7/67402906.jpg)

## 项目组件

#### 前端相关:

* BULMA(布玛) <http://bulma.io/>

* SweetAlert(通知功能) <http://t4t5.github.io/sweetalert/>

#### 后端框架:

* Django <https://www.djangoproject.com/>
![](https://user-images.githubusercontent.com/24697284/53059235-14120a00-34f1-11e9-81ea-69bbb2e445d2.png)


## 部署教程:
Expand All @@ -101,4 +58,4 @@ https://github.com/Ehco1996/django-sspanel/wiki/%E9%87%8D%E5%A4%A7%E6%9B%B4%E6%9

萌新版: [部署教程](https://github.com/Ehco1996/django-sspanel/wiki/%E9%9D%A2%E6%9D%BF%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B-%E8%90%8C%E6%96%B0%E7%89%88)

Docker版: [部署教程](https://github.com/Ehco1996/django-sspanel/wiki/%E5%88%A9%E7%94%A8Dokcer-%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85)
Docker版: [部署教程](https://github.com/Ehco1996/django-sspanel/wiki/Docker-%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85)
2 changes: 1 addition & 1 deletion apps/api/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class ApiConfig(AppConfig):
name = 'api'
name = "api"
35 changes: 18 additions & 17 deletions apps/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@

app_name = "api"
urlpatterns = [
path('user/data/', views.userData, name='userdata'),
path('node/data/', views.nodeData, name='nodedata'),
path('donate/data/', views.donateData, name='donatedata'),
path('random/port/', views.change_ss_port, name='changessport'),
path('gen/invitecode/', views.gen_invite_code, name='geninvitecode'),
path('shop/', views.purchase, name='purchase'),
path('pay/request/', views.pay_request, name='pay_request'),
path('pay/query/', views.pay_query, name='pay_query'),
path('traffic/query/', views.traffic_query, name='traffic_query'),
path('change/theme/', views.change_theme, name='change_theme'),
path('checkin/', views.checkin, name='checkin'),
path("user/data/", views.userData, name="userdata"),
path("node/data/", views.nodeData, name="nodedata"),
path("donate/data/", views.donateData, name="donatedata"),
path("random/port/", views.change_ss_port, name="changessport"),
path("gen/invitecode/", views.gen_invite_code, name="geninvitecode"),
path("shop/", views.purchase, name="purchase"),
path("traffic/query/", views.traffic_query, name="traffic_query"),
path("change/theme/", views.change_theme, name="change_theme"),
path("checkin/", views.checkin, name="checkin"),
# 邀请码接口
path('get/invitecode/', views.get_invitecode, name='get_invitecode'),
path("get/invitecode/", views.get_invitecode, name="get_invitecode"),
# web api 接口
path('nodes/<int:node_id>', views.node_api, name='get_node_info'),
path('nodes/online', views.node_online_api, name='post_onlineip'),
path('users/nodes/<int:node_id>', views.user_api, name='get_userinfo'),
path('traffic/upload', views.traffic_api, name='post_traffic'),
path('nodes/aliveip', views.alive_ip_api, name='post_aliveip'),
path("nodes/<int:node_id>", views.node_api, name="get_node_info"),
path("nodes/online", views.node_online_api, name="post_onlineip"),
path("users/nodes/<int:node_id>", views.user_api, name="get_userinfo"),
path("traffic/upload", views.traffic_api, name="post_traffic"),
path("nodes/aliveip", views.alive_ip_api, name="post_aliveip"),
# 支付
path("orders", views.OrderView.as_view(), name="order"),
path("callback/alipay", views.ailpay_callback, name="alipay_callback"),
]
Loading

0 comments on commit 56733f8

Please sign in to comment.