Skip to content
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
6 changes: 5 additions & 1 deletion cmp/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ class Meta:
fields = "__all__"

class editDecorationForm(forms.ModelForm):
country = forms.ModelChoiceField(
queryset=Country.objects.all().order_by('name'),
)

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.helper = FormHelper()
Expand Down Expand Up @@ -505,7 +509,7 @@ def __init__(self, *args, **kwargs):

class SoldierDecorationForm(forms.ModelForm):
country = forms.ModelChoiceField(
queryset=Country.objects.all(),
queryset=Country.objects.all().order_by('name'),
)

def __init__(self, *args, **kwargs):
Expand Down
17 changes: 17 additions & 0 deletions cmp/migrations/0002_alter_country_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 6.0.2 on 2026-02-11 12:09

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("cmp", "0001_initial"),
]

operations = [
migrations.AlterModelOptions(
name="country",
options={"ordering": ["name"]},
),
]
3 changes: 3 additions & 0 deletions cmp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class Country(models.Model):
country_number = models.CharField(max_length=3, unique=True)
flag = models.CharField(max_length=255, default="", blank=True)

class Meta:
ordering = ['name']

def __str__(self):
return self.name

Expand Down
1 change: 0 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ipdb
folium
Pillow
pip-tools
pip
gunicorn
azure-storage-blob
azure-identity
216 changes: 26 additions & 190 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,214 +1,50 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.in -o requirements.txt
asgiref==3.10.0
# via
# django
# django-allauth
# django-htmx
asttokens==3.0.1
# via stack-data
azure-core==1.36.0
# via
# azure-identity
# azure-storage-blob
# uv pip compile pyproject.toml --output-file requirements.txt --no-deps
azure-identity==1.25.1
# via -r requirements.in
# via cmp (pyproject.toml)
azure-storage-blob==12.27.1
# via -r requirements.in
# via cmp (pyproject.toml)
black==25.11.0
# via -r requirements.in
branca==0.8.2
# via folium
build==1.3.0
# via pip-tools
certifi==2025.11.12
# via
# requests
# sentry-sdk
cffi==2.0.0
# via cryptography
charset-normalizer==3.4.4
# via requests
click==8.3.1
# via
# black
# pip-tools
coverage==7.11.3
# via pytest-cov
# via cmp (pyproject.toml)
crispy-bootstrap5==2025.6
# via -r requirements.in
cryptography==46.0.3
# via
# azure-identity
# azure-storage-blob
# msal
# pyjwt
decorator==5.2.1
# via
# ipdb
# ipython
# via cmp (pyproject.toml)
django==5.2.8
# via
# -r requirements.in
# crispy-bootstrap5
# django-allauth
# django-crispy-forms
# django-debug-toolbar
# django-extensions
# django-htmx
# django-storages
# via cmp (pyproject.toml)
django-allauth==65.13.0
# via -r requirements.in
# via cmp (pyproject.toml)
django-crispy-forms==2.5
# via
# -r requirements.in
# crispy-bootstrap5
# via cmp (pyproject.toml)
django-debug-toolbar==6.1.0
# via -r requirements.in
# via cmp (pyproject.toml)
django-environ==0.12.0
# via -r requirements.in
# via cmp (pyproject.toml)
django-extensions==4.1
# via -r requirements.in
# via cmp (pyproject.toml)
django-htmx==1.26.0
# via -r requirements.in
# via cmp (pyproject.toml)
django-storages==1.14.6
# via -r requirements.in
executing==2.2.1
# via stack-data
# via cmp (pyproject.toml)
flake8==7.3.0
# via -r requirements.in
# via cmp (pyproject.toml)
folium==0.20.0
# via -r requirements.in
# via cmp (pyproject.toml)
gunicorn==23.0.0
# via -r requirements.in
idna==3.11
# via requests
iniconfig==2.3.0
# via pytest
# via cmp (pyproject.toml)
ipdb==0.13.13
# via -r requirements.in
ipython==9.7.0
# via ipdb
ipython-pygments-lexers==1.1.1
# via ipython
isodate==0.7.2
# via azure-storage-blob
jedi==0.19.2
# via ipython
jinja2==3.1.6
# via
# branca
# folium
# via cmp (pyproject.toml)
logzero==1.7.0
# via -r requirements.in
markupsafe==3.0.3
# via jinja2
matplotlib-inline==0.2.1
# via ipython
mccabe==0.7.0
# via flake8
msal==1.34.0
# via
# azure-identity
# msal-extensions
msal-extensions==1.3.1
# via azure-identity
mypy-extensions==1.1.0
# via black
numpy==2.3.4
# via folium
packaging==25.0
# via
# black
# build
# gunicorn
# pytest
parso==0.8.5
# via jedi
pathspec==0.12.1
# via black
pexpect==4.9.0
# via ipython
# via cmp (pyproject.toml)
pillow==12.0.0
# via -r requirements.in
pip==25.3
# via
# -r requirements.in
# pip-tools
# via cmp (pyproject.toml)
pip==26.0.1
# via cmp (pyproject.toml)
pip-tools==7.5.2
# via -r requirements.in
platformdirs==4.5.0
# via black
pluggy==1.6.0
# via
# pytest
# pytest-cov
prompt-toolkit==3.0.52
# via ipython
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
# via stack-data
pycodestyle==2.14.0
# via flake8
pycparser==2.23
# via cffi
pyflakes==3.4.0
# via flake8
pygments==2.19.2
# via
# ipython
# ipython-pygments-lexers
# pytest
pyjwt==2.10.1
# via msal
pyproject-hooks==1.2.0
# via
# build
# pip-tools
pytest==9.0.1
# via
# pytest-cov
# pytest-django
# via cmp (pyproject.toml)
pytest-cov==7.0.0
# via -r requirements.in
# via cmp (pyproject.toml)
pytest-django==4.11.1
# via -r requirements.in
pytokens==0.3.0
# via black
requests==2.32.5
# via
# azure-core
# folium
# msal
# via cmp (pyproject.toml)
sentry-sdk==2.44.0
# via -r requirements.in
setuptools==80.9.0
# via pip-tools
sqlparse==0.5.3
# via
# django
# django-debug-toolbar
stack-data==0.6.3
# via ipython
traitlets==5.14.3
# via
# ipython
# matplotlib-inline
typing-extensions==4.15.0
# via
# azure-core
# azure-identity
# azure-storage-blob
urllib3==2.5.0
# via
# requests
# sentry-sdk
wcwidth==0.2.14
# via prompt-toolkit
wheel==0.45.1
# via pip-tools
# via cmp (pyproject.toml)
whitenoise==6.11.0
# via -r requirements.in
xyzservices==2025.10.0
# via folium
# via cmp (pyproject.toml)
Loading
Loading