Skip to content

Commit 7afa126

Browse files
committed
Updates from Jeff
1 parent cf5d77e commit 7afa126

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mini_django.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ def patchAutograder(line: str) -> str:
100100
return line.replace('</body>', '\n<script src="'+dj4e_autograder+'"></script>\n</body>')
101101

102102
def httpServer(router, port):
103-
print('\n================ Starting mini_django server on '+str(port))
103+
print(f'\n================ Starting mini_django server on {port}')
104104
serversocket = socket(AF_INET, SOCK_STREAM)
105105
try :
106-
serversocket.bind(('localhost',port))
106+
serversocket.bind(('0.0.0.0',port))
107107
serversocket.listen(5)
108108
while(1):
109109
print('\n================ Waiting for the Next Request')

runserver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
if len(sys.argv) > 1 :
1818
port = int(sys.argv[1])
1919

20-
print('Access http://localhost:'+str(port))
20+
print(f"Access http://localhost:{port}")
2121
mini_django.httpServer(urls.router, port)
2222

0 commit comments

Comments
 (0)