Skip to content

Commit 34f9e13

Browse files
committed
modify file run.sh
1 parent a377785 commit 34f9e13

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

db.sqlite3

0 Bytes
Binary file not shown.

homepage/views.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#coding:utf-8
2+
import json
23
from django.shortcuts import render,render_to_response
34
from django.core.paginator import Paginator,EmptyPage,PageNotAnInteger
45
from django.http import HttpResponse
@@ -8,7 +9,8 @@
89

910
# Create your views here.
1011
def welcome(request):
11-
return HttpResponse("欢迎")
12+
st = loadjsonfile()
13+
return HttpResponse(u"%s" % st)
1214

1315
def index(request):
1416
tec_info_list_all = TeacherInfo.objects.all()
@@ -21,4 +23,11 @@ def index(request):
2123
tec_info_list = paginator.page(1)
2224
except EmptyPage:
2325
tec_info_list = paginator.page(paginator.num_pages)
24-
return render_to_response('index.html',{'tec_info_list':tec_info_list})
26+
return render_to_response('index.html',{'tec_info_list':tec_info_list})
27+
28+
29+
def loadjsonfile():
30+
j_f = open("jsonfiles/tabs.json",'r')
31+
tabs = json.load(j_f)
32+
family = tabs['fontSize']
33+
return family['2']

homepage/views.pyc

349 Bytes
Binary file not shown.

housekeeping/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
# SECURITY WARNING: don't run with debug turned on in production!
2626
DEBUG = True
2727

28-
ALLOWED_HOSTS = [u'192.168.1.14',
29-
u'112.74.90.123']
28+
ALLOWED_HOSTS = ['*']
3029

3130

3231
# Application definition

housekeeping/settings.pyc

-11 Bytes
Binary file not shown.

run.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
#!/bin/bash
2-
#python manage.py runserver 192.168.1.14:8000
3-
python manage.py runserver 112.74.90.123:8000
2+
python manage.py runserver $1:$2

0 commit comments

Comments
 (0)