forked from mbari-org/SeafloorMappingDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mbari-org#215 from MBARIMike/main
Use django-crispy-forms with the addition of status pick list for Missions filter view
- Loading branch information
Showing
11 changed files
with
114 additions
and
32 deletions.
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
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
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 @@ | ||
from crispy_forms.helper import FormHelper | ||
from crispy_forms.layout import Layout, Submit, Row, Column | ||
|
||
|
||
class MissionFilterFormHelper(FormHelper): | ||
form_method = "GET" | ||
layout = Layout( | ||
Row( | ||
Column("name", css_class="form-group col-md-2 mb-0"), | ||
Column("expedition__name", css_class="form-group col-md-2 mb-0"), | ||
Column("status", css_class="form-group col-md-2 mb-0"), | ||
Column(Submit("submit", "Filter", css_class="col-md-2 mb-0 btn-primary")), | ||
), | ||
) |
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,30 @@ | ||
# Generated by Django 4.2.9 on 2024-05-16 21:18 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("smdb", "0051_alter_mission_start_depth_alter_mission_track_length"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="mission", | ||
name="status", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[ | ||
("PS", "production_survey"), | ||
("FS", "failed_survey"), | ||
("TS", "test_survey"), | ||
("RS", "repeat_survey"), | ||
("DNU", "do_not_use_survey"), | ||
("UWC", "use_with_caution"), | ||
], | ||
max_length=128, | ||
null=True, | ||
), | ||
), | ||
] |
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
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 |
---|---|---|
|
@@ -21,9 +21,10 @@ | |
<link rel="icon" type="image/png" href="{% static 'images/favicons/smdb_favicon_ship.ico' %}"> | ||
|
||
{% block css %} | ||
{# Latest compiled and minified Bootstrap CSS #} | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
{# Other Django packages depend on Bootstrap 4 #} | ||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | ||
|
||
{# Add leaflet CSS #} | ||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/dist/leaflet.css"> | ||
<link rel="stylesheet" href="https://unpkg.com/@geoman-io/leaflet-geoman-free@latest/dist/leaflet-geoman.css"> | ||
|
@@ -49,8 +50,8 @@ | |
integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" | ||
crossorigin="anonymous"></script> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" | ||
integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" | ||
<script defer src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" | ||
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" | ||
crossorigin="anonymous"></script> | ||
|
||
{# Your stuff: Third-party javascript libraries go here #} | ||
|
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