mirror of
https://github.com/xingsu1021/pthelper.git
synced 2026-11-03 14:14:47 +08:00
初始化新增车PT,猪猪网
This commit is contained in:
@@ -3,7 +3,7 @@ from django.views.generic import TemplateView
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.http import JsonResponse
|
||||
from django.conf import settings
|
||||
import git
|
||||
from git.repo import Repo
|
||||
|
||||
# Create your views here.
|
||||
#------------------------------
|
||||
@@ -124,7 +124,7 @@ class UpdateView(LoginRequiredMixin,TemplateView):
|
||||
|
||||
if action == 'update':
|
||||
#指定仓库地址
|
||||
repo = git.repo.Repo(settings.BASE_DIR)
|
||||
repo = Repo(settings.BASE_DIR)
|
||||
#通过Repo对象获取git对象
|
||||
git = repo.git
|
||||
#通过repo对象获取remote对象
|
||||
|
||||
@@ -73,6 +73,8 @@ def init_datas():
|
||||
{'name':'ssd','name_cn':'春天','index_url':'https://springsunday.net','sign_type':'ssd'},
|
||||
{'name':'gainbound','name_cn':'丐帮','index_url':'https://gainbound.net','sign_type':'general'},
|
||||
{'name':'joyhd','name_cn':'开心','index_url':'https://www.joyhd.net','sign_type':'nosign'},
|
||||
{'name':'carpt','name_cn':'车PT','index_url':'https://carpt.net','sign_type':'general'},
|
||||
{'name':'piggo','name_cn':'猪猪网','index_url':'https://piggo.me','sign_type':'general'},
|
||||
]
|
||||
|
||||
for site in sites_data:
|
||||
|
||||
Reference in New Issue
Block a user