Compare commits

..

6 commits

Author SHA1 Message Date
Halfdan fd2a4e68ce Correct log out url 2023-10-04 12:30:42 +02:00
Halfdan 0af7ee3dd0 New login page 2023-10-04 12:26:20 +02:00
Halfdan 03d996cee9 Adding Inter font 2023-10-04 12:25:59 +02:00
Halfdan 62956deb1d Media queries 2023-10-03 20:50:34 +02:00
Halfdan 565018ea30 Variables in the CSS file 2023-10-03 19:45:19 +02:00
Halfdan 1ab7fd5c0c Starting a rather large UI/UX overhaul :D 2023-10-03 18:18:22 +02:00
17 changed files with 183 additions and 378 deletions

View file

@ -3,7 +3,7 @@ default_language_version:
exclude: ^.*\b(migrations)\b.*$ exclude: ^.*\b(migrations)\b.*$
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 rev: v4.4.0
hooks: hooks:
- id: check-ast - id: check-ast
- id: check-merge-conflict - id: check-merge-conflict
@ -16,13 +16,13 @@ repos:
- id: end-of-file-fixer - id: end-of-file-fixer
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit - repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.1.11' rev: 'v0.0.292'
hooks: hooks:
- id: ruff - id: ruff
args: args:
- --fix - --fix
- repo: https://github.com/asottile/reorder_python_imports - repo: https://github.com/asottile/reorder_python_imports
rev: v3.12.0 rev: v3.11.0
hooks: hooks:
- id: reorder-python-imports - id: reorder-python-imports
args: args:
@ -30,7 +30,7 @@ repos:
- --application-directories=.:src - --application-directories=.:src
exclude: migrations/ exclude: migrations/
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.15.0 rev: v3.13.0
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: args:
@ -51,10 +51,10 @@ repos:
hooks: hooks:
- id: add-trailing-comma - id: add-trailing-comma
- repo: https://github.com/hadialqattan/pycln - repo: https://github.com/hadialqattan/pycln
rev: v2.4.0 rev: v2.2.2
hooks: hooks:
- id: pycln - id: pycln
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.12.1 rev: 23.9.1
hooks: hooks:
- id: black - id: black

View file

@ -1,105 +0,0 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "membersystem"
description = ''
readme = "README.md"
requires-python = ">=3.11"
keywords = []
authors = [
{ name = "Víðir Valberg Guðmundsson", email = "valberg@orn.li" },
]
dependencies = [
"Django==5.0.1",
"django-money==3.4.1",
"django-allauth==0.60.0",
"psycopg[binary]==3.1.16",
"environs[django]==10.0.0",
"uvicorn==0.25.0",
"whitenoise==6.6.0",
"django-zen-queries==2.1.0",
"django-registries==0.0.3",
]
dynamic = ["version"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.envs.default]
dependencies = [
"coverage[toml]==7.3.0",
"pytest==7.2.2",
"pytest-cov",
"pytest-django==4.5.2",
"mypy==1.1.1",
"django-stubs==1.16.0",
"pip-tools==7.3.0",
"django-debug-toolbar==4.2.0",
"django-browser-reload==1.7.0",
"model-bakery==1.17.0",
]
[[tool.hatch.envs.tests.matrix]]
python = ["3.12"]
django = ["4.2", "5.0"]
[tool.hatch.envs.tests.overrides]
matrix.django.dependencies = [
{ value = "django~={matrix:django}" },
]
matrix.python.dependencies = [
{ value = "typing_extensions==4.5.0", if = ["3.10"]},
]
[tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --cov=tests --cov=append {args}"
no-cov = "cov --no-cov {args}"
typecheck = "mypy --config-file=pyproject.toml ."
requirements = "pip-compile --output-file requirements/base.txt pyproject.toml"
server = "./src/manage.py runserver"
migrate = "./src/manage.py migrate"
makemigrations = "./src/manage.py makemigrations"
createsuperuser = "./src/manage.py createsuperuser"
shell = "./src/manage.py shell"
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE="tests.settings"
addopts = "--reuse-db"
norecursedirs = "build dist docs .eggs/* *.egg-info htmlcov .git"
python_files = "test*.py"
testpaths = "tests"
pythonpath = ". tests"
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.mypy]
mypy_path = "src/"
exclude = [
"venv/",
"dist/",
"docs/",
]
namespace_packages = false
show_error_codes = true
strict = true
warn_unreachable = true
follow_imports = "normal"
#plugins = ["mypy_django_plugin.main"]
[tool.django-stubs]
#django_settings_module = "tests.settings"
[[tool.mypy.overrides]]
module = "tests.*"
allow_untyped_defs = true

View file

@ -1,8 +1,8 @@
Django==5.0.1 Django==4.2.5
django-money==3.4.1 django-money==3.3.0
django-allauth==0.60.0 django-allauth==0.57.0
psycopg[binary]==3.1.16 psycopg[binary]==3.1.12
environs[django]==10.0.0 environs[django]==9.5
uvicorn==0.25.0 uvicorn==0.23.2
whitenoise==6.6.0 whitenoise==6.5.0
django-zen-queries==2.1.0 django-zen-queries==2.1.0

View file

@ -2,97 +2,89 @@
# This file is autogenerated by pip-compile with Python 3.11 # This file is autogenerated by pip-compile with Python 3.11
# by the following command: # by the following command:
# #
# pip-compile --output-file=requirements/base.txt pyproject.toml # pip-compile --output-file=requirements/base.txt requirements/base.in
# #
asgiref==3.7.2 asgiref==3.7.2
# via django # via django
babel==2.14.0 babel==2.12.1
# via py-moneyed # via py-moneyed
certifi==2023.11.17 certifi==2022.9.24
# via requests # via requests
cffi==1.16.0 cffi==1.15.1
# via cryptography # via cryptography
charset-normalizer==3.3.2 charset-normalizer==2.1.1
# via requests # via requests
click==8.1.7 click==7.1.2
# via uvicorn # via uvicorn
cryptography==41.0.7 cryptography==38.0.3
# via pyjwt # via pyjwt
defusedxml==0.7.1 defusedxml==0.7.1
# via python3-openid # via python3-openid
dj-database-url==2.1.0 dj-database-url==1.0.0
# via environs # via environs
dj-email-url==1.0.6 dj-email-url==1.0.6
# via environs # via environs
django==5.0.1 django==4.2.5
# via # via
# -r requirements/base.in
# dj-database-url # dj-database-url
# django-allauth # django-allauth
# django-money # django-money
# django-registries
# django-zen-queries # django-zen-queries
# membersystem (pyproject.toml) django-allauth==0.57.0
django-allauth==0.60.0 # via -r requirements/base.in
# via membersystem (pyproject.toml) django-cache-url==3.4.2
django-cache-url==3.4.5
# via environs # via environs
django-money==3.4.1 django-money==3.3.0
# via membersystem (pyproject.toml) # via -r requirements/base.in
django-registries==0.0.3
# via membersystem (pyproject.toml)
django-zen-queries==2.1.0 django-zen-queries==2.1.0
# via membersystem (pyproject.toml) # via -r requirements/base.in
environs[django]==10.0.0 environs[django]==9.5.0
# via # via -r requirements/base.in
# environs
# membersystem (pyproject.toml)
h11==0.14.0 h11==0.14.0
# via uvicorn # via uvicorn
idna==3.6 idna==3.4
# via requests # via requests
marshmallow==3.20.1 marshmallow==3.19.0
# via environs # via environs
oauthlib==3.2.2 oauthlib==3.2.2
# via requests-oauthlib # via requests-oauthlib
packaging==23.2 packaging==21.3
# via marshmallow # via marshmallow
psycopg[binary]==3.1.16 psycopg[binary]==3.1.12
# via # via -r requirements/base.in
# membersystem (pyproject.toml) psycopg-binary==3.1.12
# psycopg
psycopg-binary==3.1.16
# via psycopg # via psycopg
py-moneyed==3.0 py-moneyed==3.0
# via django-money # via django-money
pycparser==2.21 pycparser==2.21
# via cffi # via cffi
pyjwt[crypto]==2.8.0 pyjwt[crypto]==2.6.0
# via # via django-allauth
# django-allauth pyparsing==3.0.9
# pyjwt # via packaging
python-dotenv==1.0.0 python-dotenv==0.21.0
# via environs # via environs
python3-openid==3.2.0 python3-openid==3.2.0
# via django-allauth # via django-allauth
requests==2.31.0 requests==2.28.1
# via # via
# django-allauth # django-allauth
# requests-oauthlib # requests-oauthlib
requests-oauthlib==1.3.1 requests-oauthlib==1.3.1
# via django-allauth # via django-allauth
sqlparse==0.4.4 sqlparse==0.4.3
# via django # via django
typing-extensions==4.9.0 typing-extensions==4.8.0
# via # via
# dj-database-url
# psycopg # psycopg
# py-moneyed # py-moneyed
urllib3==2.1.0 urllib3==1.26.12
# via requests # via requests
uvicorn==0.25.0 uvicorn==0.23.2
# via membersystem (pyproject.toml) # via -r requirements/base.in
whitenoise==6.6.0 whitenoise==6.5.0
# via membersystem (pyproject.toml) # via -r requirements/base.in
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
# setuptools # setuptools

View file

@ -1,8 +1,8 @@
-r test.txt -r test.txt
django-browser-reload==1.12.1 django-browser-reload==1.11.0
django-debug-toolbar==4.2.0 django-debug-toolbar==4.2.0
django-extensions==3.2.3 django-extensions==3.2.3
django-stubs==4.2.7 django-stubs==1.12.0
ipython==8.19.0 ipython==8.6.0
mypy==1.8.0 mypy==1.5.1

View file

@ -8,32 +8,33 @@ asgiref==3.7.2
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# django # django
# django-browser-reload asttokens==2.1.0
asttokens==2.4.1
# via stack-data # via stack-data
babel==2.14.0 babel==2.12.1
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# py-moneyed # py-moneyed
certifi==2023.11.17 backcall==0.2.0
# via ipython
certifi==2022.9.24
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# requests # requests
cffi==1.16.0 cffi==1.15.1
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# cryptography # cryptography
charset-normalizer==3.3.2 charset-normalizer==2.1.1
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# requests # requests
click==8.1.7 click==7.1.2
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# uvicorn # uvicorn
coverage==7.4.0 coverage==7.3.1
# via -r requirements/test.txt # via -r requirements/test.txt
cryptography==41.0.7 cryptography==38.0.3
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# pyjwt # pyjwt
@ -43,7 +44,7 @@ defusedxml==0.7.1
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# python3-openid # python3-openid
dj-database-url==2.1.0 dj-database-url==1.0.0
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# environs # environs
@ -51,7 +52,7 @@ dj-email-url==1.0.6
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# environs # environs
django==5.0.1 django==4.2.5
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# dj-database-url # dj-database-url
@ -63,11 +64,11 @@ django==5.0.1
# django-stubs # django-stubs
# django-stubs-ext # django-stubs-ext
# django-zen-queries # django-zen-queries
django-allauth==0.60.0 django-allauth==0.57.0
# via -r requirements/test.txt # via -r requirements/test.txt
django-browser-reload==1.12.1 django-browser-reload==1.11.0
# via -r requirements/dev.in # via -r requirements/dev.in
django-cache-url==3.4.5 django-cache-url==3.4.2
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# environs # environs
@ -75,61 +76,65 @@ django-debug-toolbar==4.2.0
# via -r requirements/dev.in # via -r requirements/dev.in
django-extensions==3.2.3 django-extensions==3.2.3
# via -r requirements/dev.in # via -r requirements/dev.in
django-money==3.4.1 django-money==3.3.0
# via -r requirements/test.txt # via -r requirements/test.txt
django-stubs==4.2.7 django-stubs==1.12.0
# via -r requirements/dev.in # via -r requirements/dev.in
django-stubs-ext==4.2.7 django-stubs-ext==0.7.0
# via django-stubs # via django-stubs
django-zen-queries==2.1.0 django-zen-queries==2.1.0
# via -r requirements/test.txt # via -r requirements/test.txt
environs[django]==10.0.0 environs[django]==9.5.0
# via -r requirements/test.txt # via -r requirements/test.txt
executing==2.0.1 executing==1.2.0
# via stack-data # via stack-data
h11==0.14.0 h11==0.14.0
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# uvicorn # uvicorn
idna==3.6 idna==3.4
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# requests # requests
ipython==8.19.0 ipython==8.6.0
# via -r requirements/dev.in # via -r requirements/dev.in
jedi==0.19.1 jedi==0.18.1
# via ipython # via ipython
lxml==5.0.1 lxml==4.9.1
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# unittest-xml-reporting # unittest-xml-reporting
marshmallow==3.20.1 marshmallow==3.19.0
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# environs # environs
matplotlib-inline==0.1.6 matplotlib-inline==0.1.6
# via ipython # via ipython
mypy==1.8.0 mypy==1.5.1
# via -r requirements/dev.in # via
# -r requirements/dev.in
# django-stubs
mypy-extensions==1.0.0 mypy-extensions==1.0.0
# via mypy # via mypy
oauthlib==3.2.2 oauthlib==3.2.2
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# requests-oauthlib # requests-oauthlib
packaging==23.2 packaging==21.3
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# marshmallow # marshmallow
parso==0.8.3 parso==0.8.3
# via jedi # via jedi
pexpect==4.9.0 pexpect==4.8.0
# via ipython # via ipython
prompt-toolkit==3.0.43 pickleshare==0.7.5
# via ipython # via ipython
psycopg[binary]==3.1.16 prompt-toolkit==3.0.32
# via ipython
psycopg[binary]==3.1.12
# via -r requirements/test.txt # via -r requirements/test.txt
psycopg-binary==3.1.16 psycopg-binary==3.1.12
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# psycopg # psycopg
@ -145,13 +150,17 @@ pycparser==2.21
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# cffi # cffi
pygments==2.17.2 pygments==2.13.0
# via ipython # via ipython
pyjwt[crypto]==2.8.0 pyjwt[crypto]==2.6.0
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# django-allauth # django-allauth
python-dotenv==1.0.0 pyparsing==3.0.9
# via
# -r requirements/test.txt
# packaging
python-dotenv==0.21.0
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# environs # environs
@ -159,7 +168,7 @@ python3-openid==3.2.0
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# django-allauth # django-allauth
requests==2.31.0 requests==2.28.1
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# django-allauth # django-allauth
@ -170,27 +179,28 @@ requests-oauthlib==1.3.1
# django-allauth # django-allauth
six==1.16.0 six==1.16.0
# via asttokens # via asttokens
sqlparse==0.4.4 sqlparse==0.4.3
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# django # django
# django-debug-toolbar # django-debug-toolbar
stack-data==0.6.3 stack-data==0.6.1
# via ipython # via ipython
tblib==3.0.0 tblib==2.0.0
# via -r requirements/test.txt # via -r requirements/test.txt
traitlets==5.14.1 tomli==2.0.1
# via django-stubs
traitlets==5.5.0
# via # via
# ipython # ipython
# matplotlib-inline # matplotlib-inline
types-pytz==2023.3.1.1 types-pytz==2022.6.0.1
# via django-stubs # via django-stubs
types-pyyaml==6.0.12.12 types-pyyaml==6.0.12.2
# via django-stubs # via django-stubs
typing-extensions==4.9.0 typing-extensions==4.8.0
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# dj-database-url
# django-stubs # django-stubs
# django-stubs-ext # django-stubs-ext
# mypy # mypy
@ -198,15 +208,15 @@ typing-extensions==4.9.0
# py-moneyed # py-moneyed
unittest-xml-reporting==3.2.0 unittest-xml-reporting==3.2.0
# via -r requirements/test.txt # via -r requirements/test.txt
urllib3==2.1.0 urllib3==1.26.12
# via # via
# -r requirements/test.txt # -r requirements/test.txt
# requests # requests
uvicorn==0.25.0 uvicorn==0.23.2
# via -r requirements/test.txt # via -r requirements/test.txt
wcwidth==0.2.13 wcwidth==0.2.5
# via prompt-toolkit # via prompt-toolkit
whitenoise==6.6.0 whitenoise==6.5.0
# via -r requirements/test.txt # via -r requirements/test.txt
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:

View file

@ -1,5 +1,5 @@
-r base.txt -r base.txt
coverage==7.4.0 coverage==7.3.1
tblib==3.0.0 tblib==2.0.0
unittest-xml-reporting==3.2.0 unittest-xml-reporting==3.2.0

View file

@ -8,29 +8,29 @@ asgiref==3.7.2
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# django # django
babel==2.14.0 babel==2.12.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# py-moneyed # py-moneyed
certifi==2023.11.17 certifi==2022.9.24
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# requests # requests
cffi==1.16.0 cffi==1.15.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# cryptography # cryptography
charset-normalizer==3.3.2 charset-normalizer==2.1.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# requests # requests
click==8.1.7 click==7.1.2
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# uvicorn # uvicorn
coverage==7.4.0 coverage==7.3.1
# via -r requirements/test.in # via -r requirements/test.in
cryptography==41.0.7 cryptography==38.0.3
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# pyjwt # pyjwt
@ -38,7 +38,7 @@ defusedxml==0.7.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# python3-openid # python3-openid
dj-database-url==2.1.0 dj-database-url==1.0.0
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# environs # environs
@ -46,36 +46,36 @@ dj-email-url==1.0.6
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# environs # environs
django==5.0.1 django==4.2.5
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# dj-database-url # dj-database-url
# django-allauth # django-allauth
# django-money # django-money
# django-zen-queries # django-zen-queries
django-allauth==0.60.0 django-allauth==0.57.0
# via -r requirements/base.txt # via -r requirements/base.txt
django-cache-url==3.4.5 django-cache-url==3.4.2
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# environs # environs
django-money==3.4.1 django-money==3.3.0
# via -r requirements/base.txt # via -r requirements/base.txt
django-zen-queries==2.1.0 django-zen-queries==2.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
environs[django]==10.0.0 environs[django]==9.5.0
# via -r requirements/base.txt # via -r requirements/base.txt
h11==0.14.0 h11==0.14.0
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# uvicorn # uvicorn
idna==3.6 idna==3.4
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# requests # requests
lxml==5.0.1 lxml==4.9.1
# via unittest-xml-reporting # via unittest-xml-reporting
marshmallow==3.20.1 marshmallow==3.19.0
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# environs # environs
@ -83,13 +83,13 @@ oauthlib==3.2.2
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# requests-oauthlib # requests-oauthlib
packaging==23.2 packaging==21.3
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# marshmallow # marshmallow
psycopg[binary]==3.1.16 psycopg[binary]==3.1.12
# via -r requirements/base.txt # via -r requirements/base.txt
psycopg-binary==3.1.16 psycopg-binary==3.1.12
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# psycopg # psycopg
@ -101,11 +101,15 @@ pycparser==2.21
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# cffi # cffi
pyjwt[crypto]==2.8.0 pyjwt[crypto]==2.6.0
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# django-allauth # django-allauth
python-dotenv==1.0.0 pyparsing==3.0.9
# via
# -r requirements/base.txt
# packaging
python-dotenv==0.21.0
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# environs # environs
@ -113,7 +117,7 @@ python3-openid==3.2.0
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# django-allauth # django-allauth
requests==2.31.0 requests==2.28.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# django-allauth # django-allauth
@ -122,27 +126,26 @@ requests-oauthlib==1.3.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# django-allauth # django-allauth
sqlparse==0.4.4 sqlparse==0.4.3
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# django # django
tblib==3.0.0 tblib==2.0.0
# via -r requirements/test.in # via -r requirements/test.in
typing-extensions==4.9.0 typing-extensions==4.8.0
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# dj-database-url
# psycopg # psycopg
# py-moneyed # py-moneyed
unittest-xml-reporting==3.2.0 unittest-xml-reporting==3.2.0
# via -r requirements/test.in # via -r requirements/test.in
urllib3==2.1.0 urllib3==1.26.12
# via # via
# -r requirements/base.txt # -r requirements/base.txt
# requests # requests
uvicorn==0.25.0 uvicorn==0.23.2
# via -r requirements/base.txt # via -r requirements/base.txt
whitenoise==6.6.0 whitenoise==6.5.0
# via -r requirements/base.txt # via -r requirements/base.txt
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:

View file

@ -7,7 +7,6 @@
{% block content %} {% block content %}
<div class="content-view">
<h1> <h1>
{{ member.username }} {{ member.username }}
</h1> </h1>
@ -40,6 +39,5 @@
{% else %} {% else %}
{% trans "No memberships" %} {% trans "No memberships" %}
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}

View file

@ -70,7 +70,6 @@ def members_admin_detail(request, member_id):
context = { context = {
"member": member, "member": member,
"subscription_periods": subscription_periods, "subscription_periods": subscription_periods,
"base_path": "admin-members",
} }
return render( return render(

View file

@ -26,12 +26,11 @@ p, h1, h2, h3, h4, h5, h6 {
:root { :root {
/* Colors */ /* Colors */
--light : #fff; --light : #fff;
--light-dust : #f6f6f6; --light-dust : #fcfcfc;
--dust : #f1f1f1; --dust : #f1f1f1;
--medium-dust : #dadada;
--dark-dust : #bfbfbf; --dark-dust : #bfbfbf;
--fade : #878787; --fade : #878787;
--twilight : #4a4a4a; --twilight : #3c3c3c;
--dark : #2a2a2a; --dark : #2a2a2a;
--custard : #f0dcac; --custard : #f0dcac;
--water : #a8f3f4; --water : #a8f3f4;
@ -62,8 +61,6 @@ h1, h2, h3, h4, h5, h6 {
a { a {
font-weight : 500; font-weight : 500;
color : var(--splash);
text-decoration : none;
} }
body { body {
@ -217,9 +214,12 @@ div.infobox {
justify-content : space-between; justify-content : space-between;
} }
div.infobox button { /*
margin-top : var(--double-space); div.services > div:hover {
transform : scale(1.02);
transition : all 0.2s;
} }
*/
div.services > div > div.description { div.services > div > div.description {
margin-bottom : var(--double-space); margin-bottom : var(--double-space);
@ -252,25 +252,6 @@ button:hover {
opacity : 1.0; opacity : 1.0;
} }
article table {
width : 100%;
border-spacing : 0;
margin : var(--space) 0;
}
article table thead th {
text-align : left;
}
article table tbody tr:nth-child(odd) {
background : var(--medium-dust);
}
article table thead th,
article table tbody td {
padding : var(--half-space);
}
form > div { form > div {
margin : 0 0 var(--double-space); margin : 0 0 var(--double-space);
} }
@ -282,9 +263,9 @@ form > div >label {
form > div > input[type="text"], form > div > input[type="text"],
form > div > input[type="password"] { form > div > input[type="password"] {
border : 2px solid var(--twilight); border : 1px solid var(--twilight);
border-radius : 6px; border-radius : 3px;
padding : 8px; padding : 6px 12px;
background : var(--light-dust); background : var(--light-dust);
width : 100%; width : 100%;
} }
@ -298,12 +279,14 @@ form > div > input[type="password"] {
#loginbox { #loginbox {
border-radius : var(--space); border-radius : var(--space);
background : var(--dust);
border : 6px solid white; border : 6px solid white;
width : 800px; width : 800px;
height : 500px; height : 500px;
display : flex; display : flex;
flex-flow : row; flex-flow : row;
//justify-content : space-between;
} }
#loginbox > div { #loginbox > div {
@ -316,27 +299,19 @@ form > div > input[type="password"] {
} }
#loginbox > div.login { #loginbox > div.login {
background : var(--light-dust);
display: flex; display: flex;
flex-flow: column; flex-flow: column;
justify-content: space-between; justify-content: space-between;
} }
#loginbox > div.signup { #loginbox > div.signup {
border-radius : 0 var(--space) var(--space) 0;
background : var(--water); background : var(--water);
display: flex; display: flex;
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
} }
#loginbox > div:first-child {
border-radius : var(--half-space) 0 0 var(--half-space);
}
#loginbox > div:last-child {
border-radius : 0 var(--half-space) var(--half-space) 0;
}
#loginbox > div:last-child > * { #loginbox > div:last-child > * {
flex : 1; flex : 1;
} }
@ -358,11 +333,13 @@ form > div > input[type="password"] {
} }
footer { footer {
margin : var(--space) var(--outer-space); position : fixed;
padding : var(--space); bottom : 0;
border-radius : var(--quarter-space); left : 0;
right : 0;
background : var(--dark); background : var(--dark);
color : var(--dust); color : var(--dust);
padding : 12px;
font-size : 0.78em; font-size : 0.78em;
opacity : 0.8; opacity : 0.8;
} }
@ -370,15 +347,3 @@ footer {
span.time_remaining { span.time_remaining {
color : var(--fade); color : var(--fade);
} }
.pagination {
display : flex;
justify-content : center;
list-style : none;
padding : 0;
margin : 0;
}
.pagination > li {
margin : 0 6px;
}

View file

@ -8,69 +8,37 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content=""> <meta name="description" content="">
<title>{% block head_title %}{% endblock %} {{ site.name }}</title> <title>{% block head_title %}{% endblock %} {{ site.name }}</title>
<link rel="stylesheet" href="{% static "fonts/inter.css" %}"> <link rel="stylesheet" href="{% static "/fonts/inter.css" %}">
<link rel="stylesheet" href="{% static "css/style.css" %}"> <link rel="stylesheet" href="{% static "/css/style.css" %}">
</head> </head>
<body> <body>
<header> <header>
<h1> data.coop membersystem </h1> <h1> data.coop membersystem </h1>
<a class="logout" href="{% url "account_logout" %}">Log out</a> <a class="logout" href="{% url "account_logout" %}">Log out</a>
</header> </header
<main> <main>
<aside> <aside>
<div> <div>
<figure></figure> <figure></figure>
<h2>{{ user }}</h2> <h2>{{ user }}</h2>
{% if current_membership %}
<dl> <dl>
<dt>Membership</dt> <dt>Membership</dt>
<dd> <dd>{% if current_membership %} Active {% endif %}</dd>
Active
</dd>
<dt>Period</dt> <dt>Period</dt>
<dd> <dd>{% if current_membership %} Until {{ current_period.upper }} <span class="time_remaining">({{ current_period.upper|timeuntil }})</span>{% endif %}</dd>
Until {{ current_period.upper }} <span class="time_remaining">({{ current_period.upper|timeuntil }})</span>
</dd>
<dt>Membership type</dt> <dt>Membership type</dt>
<dd>Normal member</dd> <dd>Normal member</dd>
</dl> </dl>
{% else %}
Your membership status will be displayed here in the future.
{% endif %}
</div> </div>
</aside> </aside>
<nav> <nav>
<ol> <ol>
<li> <li><a href="/">Dashboard</a></li>
<a href="/" class="{% active_path "index" "current" %}"> <li><a href="/services" class="current">Services</a></li>
Dashboard <li><a href="#">Payment</a></li>
</a> <li><a href="/membership">Settings</a></li>
</li>
{% comment %}
<li>
<a href="/services" class="{% active_path "services" "current" %}">
Services
</a>
</li>
{% endcomment %}
<li>
<a href="{% url "account_email" %}" class="{% active_path "account_email" "current" %}">
Email
</a>
</li>
{% if perms.membership.administrate_memberships %}
<li>
<a href="{% url "admin-members" %}" class="{% active_path "admin-members" "current" %}">
Admin
</a>
</li>
{% endif %}
</ol> </ol>
</nav> </nav>
<article> <article>

View file

@ -8,21 +8,13 @@
<div class="content-view"> <div class="content-view">
<h2>Welcome {{ user }}!</h2> <h2>Welcome {{ user }}!</h2>
<p> <p>
This is the new member area. Boink?
</p> </p>
<p>
It is very much under construction.
</p>
{% comment %}
<hr>
<br>
<div class="infobox"> <div class="infobox">
<p> <p>
To get started we need you to verify your email! To get started we need you to verify your email!
</p> </p>
<button>Verify email</button> <button>Verify email</button>
</div> </div>
{% endcomment %}
</div> </div>
{% endblock %} {% endblock %}

View file

@ -1,12 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<div class="content-view">
Coming soon!
</div>
{% comment %}
<div class="content-view"> <div class="content-view">
<h2>Services you subscribe to</h2> <h2>Services you subscribe to</h2>
<div class="services"> <div class="services">
@ -58,5 +52,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endcomment %}
{% endblock %} {% endblock %}

View file

@ -13,7 +13,7 @@ from membership.views import membership_overview
urlpatterns = [ urlpatterns = [
path("", login_required(index), name="index"), path("", login_required(index), name="index"),
path("services/", login_required(services_overview), name="services"), path("services/", login_required(services_overview), name="services-overview"),
path("membership/", membership_overview, name="membership-overview"), path("membership/", membership_overview, name="membership-overview"),
path("admin/members/", members_admin, name="admin-members"), path("admin/members/", members_admin, name="admin-members"),
path( path(

View file

@ -7,8 +7,6 @@
{% block content %} {% block content %}
<div class="content-view">
<h1> <h1>
{{ entity_name_plural|capfirst }} <small class="text-muted">{{ total_count }}</small> {{ entity_name_plural|capfirst }} <small class="text-muted">{{ total_count }}</small>
</h1> </h1>
@ -50,6 +48,7 @@
</table> </table>
{% if is_paginated %} {% if is_paginated %}
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center"> <ul class="pagination justify-content-center">
{% if not page.has_previous %} {% if not page.has_previous %}
@ -102,9 +101,8 @@
{% endif %} {% endif %}
</ul> </ul>
</nav>
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}

View file

@ -5,17 +5,9 @@ register = template.Library()
@register.simple_tag(takes_context=True) @register.simple_tag(takes_context=True)
def active_path(context, path_name, class_name) -> str | None: def active_path(context, path_name, class_name):
"""Return the given class name if the current path matches the given path name."""
path = reverse(path_name) path = reverse(path_name)
request_path = context.get("request").path request_path = context.get("request").path
# Check if the current path matches the given path name. if path == request_path or ("basepath" in context and context["basepath"] == path):
is_path = path == request_path
# Check if the current path is a sub-path of the given path name.
is_base_path = "base_path" in context and reverse(context["base_path"]) == path
if is_path or is_base_path:
return class_name return class_name