Skip to content

Commit

Permalink
Merge pull request #75 from gm3dmo/countriesinsert
Browse files Browse the repository at this point in the history
Adding countries view/page
  • Loading branch information
gm3dmo authored Oct 22, 2023
2 parents 746ddb7 + 8ef4c80 commit 83dbf27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
path("sentry-debug/", views.trigger_error ),
path("tools/army-number-search", views.army_number_search, name="army-number-search" ),
path("tools/army-number-search/<int:army_number>" , views.original_unit, name="army-number-search" ),
path('countries/', views.countries, name='countries'),
path("mgmt/countries", views.edit_countries, name="countries"),
]
8 changes: 8 additions & 0 deletions cmp/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
from django.shortcuts import render, HttpResponse

from .models import Country

from cmp.forms import editCountryForm


def countries(request):
countries = Country.objects.all()
return render(request, 'cmp/countries.html', {'countries': countries})


def index(request):
return render(request, "cmp/index.html")

Expand Down

0 comments on commit 83dbf27

Please sign in to comment.