سؤال

Is it possible to set up Python's SimpleHTTPServer to serve Django apps?

هل كانت مفيدة؟

المحلول

As per Python docs:

This class serves files from the current directory and below, directly mapping the directory structure to HTTP requests.

So SimpleHTTPServer only serves static files from a directory and is therefore unable to execute arbitrary code to provide response.

Why would you do that?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top