8000 tweak order things happen in so user will have some working stuff if … · pythonanywhere/helper_scripts@914f5c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 914f5c2

Browse files
committed
tweak order things happen in so user will have some working stuff if breaks halfway
1 parent b7df893 commit 914f5c2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scripts/pa_autoconfigure_django.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ def main(repo_url, domain, python_version, nuke):
3030

3131
project = DjangoProject(domain)
3232
project.sanity_checks(nuke=nuke)
33-
project.download_repo(repo_url, nuke=nuke),
33+
project.create_webapp(nuke=nuke)
34+
project.add_static_file_mappings()
3435
project.create_virtualenv(python_version, nuke=nuke)
36+
project.download_repo(repo_url, nuke=nuke),
3537
project.find_django_files()
38+
project.update_wsgi_file()
3639
project.update_settings_file()
3740
project.run_collectstatic()
3841
project.run_migrate()
39-
project.create_webapp(nuke=nuke)
40-
project.update_wsgi_file()
41-
project.add_static_file_mappings()
4242
project.webapp.reload()
4343

4444
print(snakesay(f'All done! Your site is now live at https://{domain}'))

tests/test_pa_autoconfigure_django.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ def test_calls_all_stuff_in_right_order(self):
1818
assert mock_DjangoProject.call_args == call('www.domain.com')
1919
assert mock_DjangoProject.return_value.method_calls == [
2020
call.sanity_checks(nuke='nuke option'),
21-
call.download_repo('repo.url', nuke='nuke option'),
21+
call.create_webapp(nuke='nuke option'),
22+
call.add_static_file_mappings(),
2223
call.create_virtualenv('python.version', nuke='nuke option'),
24+
call.download_repo('repo.url', nuke='nuke option'),
2325
call.find_django_files(),
26+
call.update_wsgi_file(),
2427
call.update_settings_file(),
2528
call.run_collectstatic(),
2629
call.run_migrate(),
27-
call.create_webapp(nuke='nuke option'),
28-
call.update_wsgi_file(),
29-
call.add_static_file_mappings(),
3030
call.webapp.reload()
3131
]
3232

0 commit comments

Comments
 (0)
0