File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/python3.5
2+ """Reloads the given site
3+
4+ Usage:
5+ pa_reload_webapp.py <domain>
6+
7+ Options:
8+ <domain> Domain name, eg www.mydomain.com
9+ """
10+
11+ from docopt import docopt
12+ import os
13+ import sys
14+
15+ from pythonanywhere .api import Webapp
16+ from pythonanywhere .snakesay import snakesay
17+
18+
19+ def main (domain_name ):
20+ webapp = Webapp (domain_name )
21+ webapp .reload ()
22+ print (snakesay (
23+ "{} has been reloaded" .format (domain_name )
24+ ))
25+
26+
27+ if __name__ == '__main__' :
28+ arguments = docopt (__doc__ )
29+ main (arguments ['<domain>' ])
Original file line number Diff line number Diff line change 99
1010setup (
1111 name = 'pythonanywhere' ,
12- version = '0.7.4 ' ,
12+ version = '0.8.1 ' ,
1313 description = 'PythonAnywhere helper tools for users' ,
1414 long_description = long_description ,
1515 long_description_content_type = "text/markdown" ,
4343 scripts = [
4444 'scripts/pa_install_webapp_letsencrypt_ssl.py' ,
4545 'scripts/pa_install_webapp_ssl.py' ,
46+ 'scripts/pa_reload_webapp.py' ,
4647 'scripts/pa_start_django_webapp_with_virtualenv.py' ,
4748 'scripts/pa_autoconfigure_django.py' ,
4849 'pythonanywhere/snakesay.py' ,
You can’t perform that action at this time.
0 commit comments