Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch import script paths #24

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/blueprints/fund_builder/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ def create_export_files(round_id):
round_short_name = get_round_by_id(round_id).short_name

# Directory to zip
directory_to_zip = f"app/export/config_generator/output/{round_short_name}/"
directory_to_zip = f"app/export_config/output/{round_short_name}/"
# Output zip file path (temporary)
output_zip_path = f"app/export/config_generator/output/{round_short_name}.zip"
output_zip_path = f"app/export_config/output/{round_short_name}.zip"

# Create a zip archive of the directory
shutil.make_archive(output_zip_path.replace(".zip", ""), "zip", directory_to_zip)
Expand Down
13 changes: 6 additions & 7 deletions app/blueprints/self_serve/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-m">What do you want to do?</h1>
<h2 class="govuk-heading-s">Template Management</h2>
<h2 class="govuk-heading-s">Template Management (post PoC)</h2>
<ul class="govuk-body">
<li class="govuk-body"><a class="govuk-link" href="/">Edit a
template Question (text only)</a></li>
<li class="govuk-body"><a class="govuk-link" href="{{ url_for('self_serve_bp.form')}}">Create a template
Application Form</a></li>
<li class="govuk-body"><a class="govuk-link" href="/">Edit a template Question (text only)</a></li>
<li class="govuk-body"><a class="govuk-link" href="/">Edit a template Page (text only)</a></li>
<li class="govuk-body"><a class="govuk-link" href="/">Edit a template Form (text only)</a></li>
<li class="govuk-body"><a class="govuk-link" href="{{ url_for('self_serve_bp.section')}}">Create a
template Section (Form group)</a></li>
<li class="govuk-body"><a class="govuk-link" href="/">Edit a
<li class="govuk-body"><a class="govuk-link" href="/">Edit or Delete a
template Section</a></li>
</ul>
<h2 class="govuk-heading-s">Fund Configuration</h2>
<h2 class="govuk-heading-s">Fund Configuration (PoC)</h2>
<ul class="govuk-body">
<li class="govuk-body"><a class="govuk-link" href="{{url_for('build_fund_bp.fund')}}">Add a Fund</a></li>
<li class="govuk-body"><a class="govuk-link" href="{{url_for('build_fund_bp.round')}}">Add a Round</a></li>
Expand Down
2 changes: 1 addition & 1 deletion app/import_config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ To import a form JSON, each file should be places in the following directory:

The import can be triggered manually by running the following command:

python app/import_config/import_config.py
python app/import_config/load_form_json.py
2 changes: 1 addition & 1 deletion app/import_config/load_form_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def read_json_from_directory(directory_path):
return form_configs


def load_form_jsons(override_fund_config):
def load_form_jsons(override_fund_config=None):
db = app.extensions["sqlalchemy"] # Move db definition here
try:
if not override_fund_config:
Expand Down
2 changes: 1 addition & 1 deletion tasks/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def init_salmon_fishing_fund():
fund_id=f.fund_id,
audit_info={"user": "dummy_user", "timestamp": datetime.now().isoformat(), "action": "create"},
title_json={"en": "round the first"},
short_name=f"R{randint(0,999)}",
short_name="TEST",
opens=datetime.now(),
deadline=datetime.now(),
assessment_start=datetime.now(),
Expand Down