Auto-generate the pricing table from the database #4

Merged
3wordchant merged 2 commits from generated-prices into master 2021-07-21 17:32:09 +00:00
Owner

All the information that's displayed on the "Pricing" page lives in the database.

Loading the VM sizes from the DB, like the supported operating systems, means less repeating-yourself: if you change the size options in the database, it'll immediately update the pricing page.

I went with a table because I couldn't work out how to do precise text alignment within the <pre> tags using Jinja, but there probably is a way. Anyway, it looks a little different:

image

I used the already-existing <table class="small"> style.

All the information that's displayed on the "Pricing" page lives in the database. Loading the VM sizes from the DB, like the supported operating systems, means less repeating-yourself: if you change the size options in the database, it'll immediately update the pricing page. I went with a table because I couldn't work out how to do precise text alignment within the `<pre>` tags using Jinja, but there probably is a way. Anyway, it looks a little different: ![image](/attachments/7e93ee9a-92f3-48db-b8eb-b46ae35df065) I used the already-existing `<table class="small">` style.
3wordchant added 1 commit 2021-07-21 10:22:03 +00:00
decentral1se approved these changes 2021-07-21 10:26:12 +00:00
decentral1se left a comment
Collaborator

💯

💯
@ -9,0 +25,4 @@
<td>${{ vm_size['dollars_per_month'] }}</td>
<td>{{ vm_size['vcpus'] }}</td>
<td>{{ vm_size['memory_mb'] }}</td>
<td>25G</td>
Collaborator

Still hard-coded?

Still hard-coded?
Author
Owner

Ah yes, correction:

All the information that's displayed on the "Pricing" page lives in the database. (except for hard disk size, which isn't yet configurable)

Ah yes, correction: > All the information that's displayed on the "Pricing" page lives in the database. **(except for hard disk size, which isn't yet configurable)**
decentral1se marked this conversation as resolved
forest added 1 commit 2021-07-21 16:53:59 +00:00
Collaborator

I'm forest johnson and I approve this message

I'm forest johnson and I approve this message
3wordchant merged commit 46f49e8d8f into master 2021-07-21 17:32:09 +00:00
3wordchant deleted branch generated-prices 2021-07-21 17:40:52 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: 3wordchant/capsul-flask#4
No description provided.