Skip to content

Commit

Permalink
deploy server
Browse files Browse the repository at this point in the history
  • Loading branch information
APTX-4869-MDZZ committed Sep 2, 2017
1 parent 8f5ac08 commit 4ba2b2e
Show file tree
Hide file tree
Showing 65 changed files with 86 additions and 27 deletions.
Binary file removed .DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,10 @@ static/project_page/devices_img/

#vscode
/.vscode/*

#conf
bio_nginx.conf
gunicorn.conf.py

#log
log/*
Binary file modified BioDesignVer/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified BioDesignVer/__pycache__/settings.cpython-35.pyc
Binary file not shown.
Binary file modified BioDesignVer/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file modified BioDesignVer/__pycache__/wsgi.cpython-35.pyc
Binary file not shown.
10 changes: 6 additions & 4 deletions BioDesignVer/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*',]

# Application definition

Expand All @@ -40,7 +40,8 @@
'projectManage',
'design',
'system',
'geneRelationship'
'geneRelationship',
'gunicorn'
]

MIDDLEWARE = [
Expand Down Expand Up @@ -82,7 +83,7 @@
'ENGINE': 'django.db.backends.mysql',
'NAME': 'biodesignver',
'USER': 'root',
'PASSWORD': 'qaz123',
'PASSWORD': '',
'HOST': '',
'PORT': '3306',
}
Expand Down Expand Up @@ -128,4 +129,5 @@
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
)
STATIC_ROOT = '/root/HFUT-2017/static'
Binary file modified accounts/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/views.cpython-35.pyc
Binary file not shown.
Binary file modified accounts/migrations/__pycache__/0001_initial.cpython-35.pyc
Binary file not shown.
Binary file modified accounts/migrations/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
8 changes: 6 additions & 2 deletions accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

def register(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
userName = noneIfEmptyString(data['username'])
if not userName:
raise myError('The username can\'t be none.' )
Expand Down Expand Up @@ -72,7 +74,9 @@ def getLogin(request):

def login(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
user = data['username']
password = data['password']
customerUser = User()
Expand Down
Binary file modified design/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified design/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file modified design/__pycache__/getImage.cpython-35.pyc
Binary file not shown.
Binary file modified design/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file modified design/__pycache__/recommend.cpython-35.pyc
Binary file not shown.
Binary file modified design/__pycache__/search_part.cpython-35.pyc
Binary file not shown.
Binary file modified design/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file modified design/__pycache__/views.cpython-35.pyc
Binary file not shown.
Binary file modified design/migrations/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
28 changes: 21 additions & 7 deletions design/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

def getChain(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -77,7 +79,9 @@ def getChain(request):

def searchParts(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -118,7 +122,9 @@ def searchParts(request):

def getParts(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -159,7 +165,9 @@ def getParts(request):

def updateChain(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -211,7 +219,9 @@ def updateChain(request):

def getARecommend(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
token = Token()
token = Token.objects.filter(token=data.data['token']).first()
chainStr = data.data['seq']
Expand Down Expand Up @@ -253,7 +263,9 @@ def getARecommend(request):

def getMRecommend(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -300,7 +312,9 @@ def getMRecommend(request):

def getResultImage(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down
Binary file modified geneRelationship/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified geneRelationship/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file modified geneRelationship/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file modified geneRelationship/__pycache__/search_relation.cpython-35.pyc
Binary file not shown.
Binary file modified geneRelationship/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file modified geneRelationship/__pycache__/views.cpython-35.pyc
Binary file not shown.
Binary file not shown.
Binary file modified geneRelationship/migrations/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
32 changes: 24 additions & 8 deletions geneRelationship/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

def randomGene(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -66,7 +68,9 @@ def randomGene(request):

def searchGenes(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -104,7 +108,9 @@ def searchGenes(request):

def getGeneInfo(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -143,7 +149,9 @@ def getGeneInfo(request):

def getRelatedGene(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -184,7 +192,9 @@ def getRelatedGene(request):

def getRelatedPaper(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -221,7 +231,9 @@ def getRelatedPaper(request):

def getOneSentence(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -259,7 +271,9 @@ def getOneSentence(request):

def getThreeSentences(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -297,7 +311,9 @@ def getThreeSentences(request):

def getRelatedDisease(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down
Binary file modified projectManage/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified projectManage/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file modified projectManage/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file modified projectManage/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file modified projectManage/__pycache__/views.cpython-35.pyc
Binary file not shown.
Binary file modified projectManage/migrations/__pycache__/0001_initial.cpython-35.pyc
Binary file not shown.
Binary file modified projectManage/migrations/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file removed static/.DS_Store
Binary file not shown.
Binary file removed static/design/.DS_Store
Binary file not shown.
Binary file removed static/design/img/.DS_Store
Binary file not shown.
Binary file removed static/fonts/.DS_Store
Binary file not shown.
Binary file removed static/gene_info/.DS_Store
Binary file not shown.
Binary file removed static/gene_page/.DS_Store
Binary file not shown.
Binary file removed static/icons/.DS_Store
Binary file not shown.
Binary file removed static/project_page/.DS_Store
Binary file not shown.
Binary file removed static/register/.DS_Store
Binary file not shown.
Binary file removed static/relationship_detail/.DS_Store
Binary file not shown.
Binary file removed static/system_page/.DS_Store
Binary file not shown.
Binary file modified system/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified system/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file modified system/__pycache__/fasta_reader.cpython-35.pyc
Binary file not shown.
Binary file modified system/__pycache__/gene.cpython-35.pyc
Binary file not shown.
Binary file modified system/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file modified system/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file modified system/__pycache__/views.cpython-35.pyc
Binary file not shown.
Binary file modified system/migrations/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
16 changes: 12 additions & 4 deletions system/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

def searchCompound(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -52,7 +54,9 @@ def searchCompound(request):

def getCompound(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -89,7 +93,9 @@ def getCompound(request):

def getGene(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down Expand Up @@ -126,7 +132,9 @@ def getGene(request):

def getRelatedCompound(request):
try:
data = json.loads(request.body)
body = request.body
body = body.decode('utf-8')
data = json.loads(body)
try:
token = Token.objects.filter(token=data['token']).first()
user = token.user
Expand Down
12 changes: 10 additions & 2 deletions tranCompoundDataToES.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ def saveInfoToES(es, compound_list):
def mainFunc():
es = Elasticsearch()
print('process started')
compound_list = compound.objects.all()[1000:5000]
saveInfoToES(es, compound_list)
x = 0
y = 1000
total = compound.objects.count()
while y < total:
compound_list = compound.objects.all()[x:y]
saveInfoToES(es, compound_list)
x = y
y = y+1000
if y > total:
y = total
print('process ended')

if __name__ == '__main__':
Expand Down
Binary file modified utils/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified utils/functionTools/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified utils/functionTools/__pycache__/generalFunction.cpython-35.pyc
Binary file not shown.

0 comments on commit 4ba2b2e

Please sign in to comment.