初始化新增车PT,猪猪网

This commit is contained in:
xingsu1021
2022-05-23 16:12:32 +08:00
parent eff07348e6
commit b02c7c5dac
2 changed files with 4 additions and 2 deletions

View File

@@ -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对象

View File

@@ -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: