Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
from django import http | |
from django.utils.http import urlquote | |
from django import urls | |
from django.conf import settings | |
from django.utils.deprecation import MiddlewareMixin | |
class AppendOrRemoveSlashMiddleware(MiddlewareMixin): | |
"""Like django's built in APPEND_SLASH functionality, but also works in | |
reverse. Eg. will remove the slash if a slash-appended url won't resolve, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
/* | |
Serve is a very simple static file server in go | |
Usage: | |
-p="8100": port to serve on | |
-d=".": the directory of static files to host | |
Navigating to http://localhost:8100 will display the index.html or directory | |
listing file. | |
*/ | |
package main |