-
Notifications
You must be signed in to change notification settings - Fork 2
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 #2 from opennorth/upgrade
Upgrade Python and Django
- Loading branch information
Showing
11 changed files
with
81 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Lint | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- run: pip install --upgrade flake8 isort | ||
- run: flake8 . | ||
- run: isort . |
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
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
from django.conf.urls import url | ||
from django.urls import re_path | ||
|
||
from postcodes.views import PostcodeDetailView | ||
|
||
urlpatterns = [ | ||
url(r'^postcodes/(?P<code>\w{6})/$', PostcodeDetailView.as_view()), | ||
re_path(r'^postcodes/(?P<code>\w{6})/$', PostcodeDetailView.as_view()), | ||
|
||
# Backwards compatibility. | ||
url(r'^postcodes/(?P<code>\w{6})/boundaries/$', PostcodeDetailView.as_view()), | ||
url(r'^postcodes/(?P<code>\w{6})/representatives/$', PostcodeDetailView.as_view()), | ||
re_path(r'^postcodes/(?P<code>\w{6})/boundaries/$', PostcodeDetailView.as_view()), | ||
re_path(r'^postcodes/(?P<code>\w{6})/representatives/$', PostcodeDetailView.as_view()), | ||
] |
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,3 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.2"] | ||
build-backend = "setuptools.build_meta" |
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,24 @@ | ||
[metadata] | ||
name = represent-postcodes | ||
version = 0.0.1 | ||
license = MIT | ||
description = A web API for postal codes associated to electoral districts, packaged as a Django app. | ||
url = https://github.com/opennorth/represent-postcodes | ||
classifiers = | ||
Programming Language :: Python :: 3 | ||
License :: OSI Approved :: MIT License | ||
Framework :: Django | ||
|
||
[options] | ||
packages = find: | ||
install_requires = | ||
django-appconf | ||
represent-boundaries | ||
|
||
[isort] | ||
line_length = 119 | ||
profile = black | ||
|
||
[flake8] | ||
max-line-length = 119 | ||
exclude = postcodes/migrations |