1
0
Fork 0
Commit graph

37 commits

Author SHA1 Message Date
1076552f75
try a few ways to make form load/submit work, add stub on inline formsets to display nested forms
c.f.:

-
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets
- https://swapps.com/blog/working-with-nested-forms-with-django/
2025-03-04 10:36:15 +01:00
4273c7a608
add model changes to make it boot (allow null) 2025-03-04 09:09:50 +01:00
a088d25eb7
adjust obsolete naming 2025-03-03 17:00:16 +01:00
b3b525dee4
clean-up 2025-03-03 15:58:37 +01:00
8fabd7f0f1
reverse relationship 2025-03-03 15:51:19 +01:00
0f2c5390d6
strip out admin stuff for now 2025-03-03 15:45:39 +01:00
fb5e8ae453
rename checkboxes to fix nix model 2025-03-03 15:31:27 +01:00
014c3efc70
expand to multiple lines to allow commenting parts 2025-03-03 15:29:25 +01:00
1ebea118cc
migration: rm replaces 2025-03-03 14:26:11 +01:00
99b8fe8870
Squash migrations 2025-03-03 12:28:31 +01:00
d32e11389c
Remove trailing whitespace 2025-03-03 12:28:31 +01:00
624e354da5
fix saving for sepparated models 2025-03-03 12:28:31 +01:00
7c8c6c7eb9
Seperation of configuration form 2025-03-03 12:28:31 +01:00
da2e7d93a9
add enable toggle, let operators have many configuraitons
this commit is a bit of a jumble, but it allows us to disable
a configuration so the associated deployment can in principle be
garbage-collected, and allows operators to have multiple configurations.
it also (as a temporary hack) ties the deployment subdomain to the username so it's clear to
operators where we're deploying to.
2025-03-03 12:28:31 +01:00
a97418c30e
rename form and add navigation element 2025-03-03 12:28:31 +01:00
af1c051498
don't use hungarian notation for model names 2025-03-03 12:28:31 +01:00
c8062a87d4
fix wrong rebase of base.html 2025-03-03 12:28:31 +01:00
2fb0ccf0aa
add redirection to deploy page after save 2025-03-03 12:28:31 +01:00
46107cb21d
Add domain dropdown menu 2025-03-03 12:28:31 +01:00
17570c6434
add first part of save able login 2025-03-03 12:28:31 +01:00
bb12139f5a
Add saveable Deploy services form 2025-03-03 12:28:31 +01:00
66e88325ec
add first part of save able login 2025-03-03 12:28:31 +01:00
Kiara Grouwstra
4c1aa34d97
add simple form, closes ,
note that i haven't done much with validation or conditional
enabling/hiding - if we start doing front-end frameworks those may have
opinions on this
2025-03-03 12:28:31 +01:00
f828afd5d5
minimum setup i got working for deployment 2025-02-27 09:07:13 +01:00
c2db12a735 add simple (ngi) favicon to fedi panel, fixes 404 not found error ()
Reviewed-on: 
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-02-19 23:10:33 +01:00
92563d387a test login/logout redirection ()
this concludes  with a test covering most of the user story.

test in the devshell:
```
manage test panel
```

test in full isolation:
```
nix-build -A tests
```

Reviewed-on: 
Reviewed-by: kiara Grouwstra <kiara@procolix.eu>
2025-02-19 23:07:51 +01:00
59122901ce make login link part of global navigation
this makes navigation uniform and the information architecture easier to
reason about
2025-02-19 15:43:45 +01:00
fc586273dc implement login URL as templatetag
this eases testing as it allows generating that URL inside a test
instead of scraping HTML output
2025-02-19 15:40:51 +01:00
65782c65ba add debug toolbar 2025-02-18 18:25:37 +01:00
857e1b12f5 add more fresh-start instructions ()
Reviewed-on: 
Reviewed-by: kiara Grouwstra <kiara@procolix.eu>
2025-02-18 18:21:58 +01:00
a3365eb508 more conventional naming for views and templates 2025-02-18 17:29:06 +01:00
73c9c884d7 redirect to current page after login/logout 2025-02-18 17:15:55 +01:00
ed4912800f Add page showing account info
Co-authored-by: lois <lois@procolix.eu>
Co-authored-by: Kiara Grouwstra <kiara.grouwstra@gmail.com>
2025-02-18 15:44:15 +01:00
ffd6213549 Add login indicator 2025-02-18 11:01:09 +01:00
Kiara Grouwstra
ec4e802124
add .envrc files 2025-02-13 14:48:21 +01:00
f97dc7e121 fix settings and add dummy view
This introduces customisation to `settings.py` that
- allow controlling the relevant parameters from our systemd wrapper
  (more brittle and non-obvious than it should be, see TODOs)
- correctly configure SASS processing and static file compression
  (not as easy as it sounds)
2025-02-13 00:26:28 +01:00
7c33e8aaf3 scaffold Django web service
This setup is greatly inspired by the one used for [0], although with
notable modifications, such as:
- a SASS preprocessor and CSS compressor
- more streamlined NixOS integration tests
- cleaned up service configuration
- a few notes on how to do things better in the future

[0]: https://github.com/Nix-Security-WG/nix-security-tracker/

Apart from cloning the Nix setup, there were additional steps:
- Create an empty `src` directory, since the package requires it
- In the development shell, run `django-admin startproject panel src`

Note that while you can already do

```bash
manage migrate
manage runserver
```

the NixOS integration tests will fail, since `settings.py` needs
careful massaging to expose knobs that can be turned from our systemd
wrapper. The required changes are introduced in the next commit to make
them observable.

Noteworthy related work:

- https://github.com/sephii/django.nix

  Rather mature setup with a clean interface, uses Caddy as reverse proxy.

- https://git.dgnum.eu/mdebray/djangonix

  A work-in-progress attempt to capture more moving parts through the
  module system, in particular secrets.

- https://github.com/DavHau/django-nixos

  Out of date and somewhat simplistic, but serves as a reasonable
  example for what can be done

I chose the variant I'm intimately familiar with in order to be able to
pass on knowledge or help with maintenance. But for the future
I strongly recommend picking the good bits from the other
implementations that control complexity in static configuration parts
through Nix expressions.
2025-02-13 00:26:28 +01:00