File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ def patchAutograder(line: str) -> str:
100
100
return line .replace ('</body>' , '\n <script src="' + dj4e_autograder + '"></script>\n </body>' )
101
101
102
102
def httpServer (router , port ):
103
- print ('\n ================ Starting mini_django server on ' + str ( port ) )
103
+ print (f '\n ================ Starting mini_django server on { port } ' )
104
104
serversocket = socket (AF_INET , SOCK_STREAM )
105
105
try :
106
- serversocket .bind (('localhost ' ,port ))
106
+ serversocket .bind (('0.0.0.0 ' ,port ))
107
107
serversocket .listen (5 )
108
108
while (1 ):
109
109
print ('\n ================ Waiting for the Next Request' )
Original file line number Diff line number Diff line change 17
17
if len (sys .argv ) > 1 :
18
18
port = int (sys .argv [1 ])
19
19
20
- print (' Access http://localhost:' + str ( port ) )
20
+ print (f" Access http://localhost:{ port } " )
21
21
mini_django .httpServer (urls .router , port )
22
22
You can’t perform that action at this time.
0 commit comments