2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-12-18 06:22:18 +00:00

ruff config

This commit is contained in:
Philip Sargent 2024-12-15 18:48:28 +00:00
parent 5475a0b853
commit eb74940ca8
4 changed files with 71 additions and 37 deletions

View File

@ -1,13 +1,12 @@
[tool.black]
line-length = 120
[tool.isort]
profile = 'black'
line-length=120
# Do not edit pyproject.toml, it is overwritten.
# Instead, edit dev.toml and/or server.toml
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
# we do not use black or isort, we use ruff instead
line-length=120
ignore = ["E402"]
lint.ignore = ["E402", "F541"]
[project]
name = "troggle"
@ -26,8 +25,6 @@ dev = [
"unidecode>=1.3.8",
"black>=24.10.0",
"coverage>=7.6.9",
"deptry>=0.21.1",
"isort>=5.13.2",
]
# conlficting groups not implemented in uv yet

View File

@ -1,13 +1,12 @@
[tool.black]
line-length = 120
[tool.isort]
profile = 'black'
line-length=120
# Do not edit pyproject.toml, it is overwritten.
# Instead, edit dev.toml and/or server.toml
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
# we do not use black or isort, we use ruff instead
line-length=120
ignore = ["E402"]
lint.ignore = ["E402", "F541"]
[project]
name = "troggle"
@ -26,8 +25,6 @@ dev = [
"unidecode>=1.3.8",
"black>=24.10.0",
"coverage>=7.6.9",
"deptry>=0.21.1",
"isort>=5.13.2",
]
# conlficting groups not implemented in uv yet

View File

@ -1,3 +1,11 @@
# Do not edit pyproject.toml, it is overwritten.
# Instead, edit dev.toml and/or server.toml
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
# we do not use black or isort, we use ruff instead
line-length=120
lint.ignore = ["E402", "F541"]
[project]
name = "troggle-server"
@ -11,4 +19,7 @@ dependencies = [
"piexif==1.1.3",
"pillow==9.4.0",
"unidecode==1.3.6",
"black>=24.10.0",
"coverage>=7.6.9",
]
]

67
urls.py
View File

@ -1,31 +1,60 @@
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path, re_path
from django.conf.urls.static import static
from troggle.core.views import statistics, survex
from troggle.core.views.auth import expologin, expologout
from troggle.core.views.caves import (cave3d, caveindex, entranceindex, caveslist,
cavepage, caveslugfwd, caveQMs, edit_cave, cave_debug,
edit_entrance, get_entrances, qm, expo_kml, expo_kmz)
from troggle.core.views.caves import (
cave3d,
cave_debug,
caveindex,
cavepage,
caveQMs,
caveslist,
caveslugfwd,
edit_cave,
edit_entrance,
entranceindex,
expo_kml,
expo_kmz,
get_entrances,
qm,
)
from troggle.core.views.drawings import dwgallfiles, dwgfilesingle
from troggle.core.views.editor_helpers import image_selector, new_image_form
from troggle.core.views.expo import (pubspage, indexpage, editexpopage, expofiles_redirect,
expofilessingle, expopage, map, mapfile,
mediapage, spider)
from troggle.core.views.logbooks import (QMs_jsonListView, Expeditions_jsonListView,
Expeditions_tsvListView, expedition, logreport, logentrydelete,
get_logbook_entries, get_people,
logbookentry, notablepersons, person,
personexpedition)
from troggle.core.views.other import (controlpanel, exportlogbook, frontpage,
todos)
from troggle.core.views.expo import (
editexpopage,
expofiles_redirect,
expofilessingle,
expopage,
indexpage,
map,
mapfile,
mediapage,
pubspage,
spider,
)
from troggle.core.views.logbooks import (
Expeditions_jsonListView,
Expeditions_tsvListView,
QMs_jsonListView,
expedition,
get_logbook_entries,
get_people,
logbookentry,
logentrydelete,
logreport,
notablepersons,
person,
personexpedition,
)
from troggle.core.views.other import controlpanel, exportlogbook, frontpage, todos
from troggle.core.views.prospect import prospecting
from troggle.core.views.scans import (allscans, cavewallets, scansingle,
walletslistperson, walletslistyear)
from troggle.core.views.uploads import dwgupload, photoupload, gpxupload, expofilerename, logbookedit
from troggle.core.views.scans import allscans, cavewallets, scansingle, walletslistperson, walletslistyear
from troggle.core.views.uploads import dwgupload, expofilerename, gpxupload, logbookedit, photoupload
from troggle.core.views.wallets_edit import walletedit
"""This sets the actualurlpatterns[] and urlpatterns[] lists which django uses
to resolve urls - in both directions as these are declarative.
@ -56,7 +85,7 @@ todo = '''
# the first place and what they were intended to provide is obscure.
# WHen running on the server, apache intercepts all teh /expofiles/ files so troggle never sees them,
# WHen running on the server, apache intercepts all the /expofiles/ files so troggle never sees them,
# so the "content type" is set by whatever apache thinks it should be. Which means .gpx files
# get treated as XML and the web browser fails to do anything usefull