How to deal with server not serving *.py files?
See original GitHub issueI am trying to deploy a Brython project on a server that responds with “500 Internal server error” when requesting a *.py file. Renaming the file to *.txt and referencing it like that (<script type="text/python" src="overview.txt"></script>
) works, but using the Python import
-statement for one’s own modules does not work this way. Putting all code into one *.txt file works, though … Is there an easier solution to this problem?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Django server does not serve static files for admin page
Try using this sample code in your settings.py file: STATIC_URL = '/static/' STATICFILES_DIRS=[ ... python manage.py collectstatic.
Read more >Serving Files with Python's SimpleHTTPServer Module
Note: While SimpleHTTPServer is a great way to easily serve files from a directory, it shouldn't be used in a production environment. According ......
Read more >Nginx not serving static files for Django app! Help! | DigitalOcean
The issue is, it is not loading any static file! My nano /etc/nginx/sites-available/webapp_name file looks like this: server { server_name ...
Read more >How to deploy static files | Django documentation
When your static files change, run collectstatic locally. · Push your local STATIC_ROOT up to the static file server into the directory that's...
Read more >74 - Static Files in Development - Python & Django 3.2 Tutorial ...
74 - Static Files in Development - Python & Django 3.2 Tutorial Series Try Django 3.2 is a series to teach you the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rayluo I do not have any control over the server as it is run by a commercial provider. All I can do is uploading files.
I have included the change in the latest release (3.9.6).