-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): adding admin to initiate batch model score requests (#653)
* feat(api): adding admin to initiate batch model score requests * cleanup
- Loading branch information
1 parent
642d65f
commit 830ca20
Showing
6 changed files
with
192 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Generated by Django 4.2.6 on 2024-08-02 22:24 | ||
|
||
from django.db import migrations, models | ||
import registry.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("registry", "0033_score_expiration_date"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="BatchModelScoringRequest", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("created_at", models.DateTimeField(auto_now_add=True)), | ||
("s3_filename", models.CharField(max_length=100)), | ||
("model_list", models.CharField(max_length=100)), | ||
( | ||
"status", | ||
models.CharField( | ||
choices=[ | ||
("PENDING", registry.models.BatchRequestStatus["PENDING"]), | ||
("DONE", registry.models.BatchRequestStatus["DONE"]), | ||
], | ||
default=registry.models.BatchRequestStatus["PENDING"], | ||
max_length=10, | ||
), | ||
), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
api/registry/templates/registry/batch_model_scoring_request_changelist.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends 'admin/change_list.html' %} | ||
|
||
{% block object-tools %} | ||
<a style="padding: 8px; margin: 20px; font-weight: bold; text-decoration: none; border-radius: 12px; background-color: blue; color: white;" | ||
href="import-csv/"> | ||
Upload Addresses 📁 | ||
</a> | ||
<br /> | ||
<br /> | ||
{{ block.super }} | ||
{% endblock %} |
14 changes: 14 additions & 0 deletions
14
api/registry/templates/registry/batch_model_scoring_request_csv_import_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% extends 'admin/base.html' %} | ||
|
||
{% block content %} | ||
<div> | ||
<form action="." method="POST" enctype="multipart/form-data"> | ||
{{ form.as_p }} | ||
{% csrf_token %} | ||
|
||
<button type="submit">Submit</button> | ||
</form> | ||
</div> | ||
<br /> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters