8000 switch to being all about autoconfigure-django for now · pythonanywhere/helper_scripts@34f42ee · GitHub
[go: up one dir, main page]

Skip to content

Commit 34f42ee

Browse files
committed
switch to being all about autoconfigure-django for now
1 parent be86f2f commit 34f42ee

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

scripts/pa_autoconfigure_webapp.py renamed to scripts/pa_autoconfigure_django.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/usr/bin/python3.6
2-
"""Autoconfigure a web app based on a github URL.
2+
"""Autoconfigure a Django project from on a github URL.
33
44
- downloads the repo
5-
- detects a requirements.txt and installs it into a virtualenv
6-
- autodetects django / flask and creates wsgi configuration for them
5+
- creates a virtualenv and installs django (or detects a requirements.txt if available)
6+
- creates webapp via api
7+
- creates django wsgi configuration file
78
- adds static files config
8-
- adds placeholders for any detected environment variables
99
1010
Usage:
11-
pa_autoconfigure_webapp.py <git-repo-url> [--domain=<domain> --python=<python-version>] [--nuke]
11+
pa_autoconfigure_django.py <git-repo-url> [--domain=<domain> --python=<python-version>] [--nuke]
1212
1313
Options:
1414
--domain=<domain> Domain name, eg www.mydomain.com [default: your-username.pythonanywhere.com]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
entry_points={},
3939
scripts=[
4040
'scripts/pa_start_django_webapp_with_virtualenv.py',
41-
'scripts/pa_autoconfigure_webapp.py',
41+
'scripts/pa_autoconfigure_django.py',
4242
'pythonanywhere/snakesay.py',
4343
]
4444
)

tests/test_pa_autoconfigure_webapp.py renamed to tests/test_pa_autoconfigure_django.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pathlib import Path
55
import pytest
66

7-
from scripts.pa_autoconfigure_webapp import main, download_repo
7+
from scripts.pa_autoconfigure_django import main, download_repo
88

99

1010
@pytest.fixture
@@ -23,7 +23,7 @@ def mock_main_functions():
2323
for function in functions:
2424
mock = getattr(mocks, function)
2525
patcher = patch(
26-
'scripts.pa_autoconfigure_webapp.{}'.format(function),
26+
'scripts.pa_autoconfigure_django.{}'.format(function),
2727
mock
2828
)
2929
patchers.append(patcher)
@@ -71,7 +71,7 @@ def test_domain_defaults_to_using_current_username(self, mock_main_functions):
7171

7272

7373
def test_lowercases_username(self, mock_main_functions):
74-
with patch('scripts.pa_autoconfigure_webapp.getpass') as mock_getpass:
74+
with patch('scripts.pa_autoconfigure_django.getpass') as mock_getpass:
7575
mock_getpass.getuser.return_value = 'UserName1'
7676
main('a-url', 'your-username.pythonanywhere.com', 'python.version', 'nukey')
7777
assert mock_main_functions.sanity_checks.call_args == call(

0 commit comments

Comments
 (0)
0