Initialize Django project #8
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 1 day
Due date
rixx
1 day
No due date set.
Dependencies
No dependencies set.
Reference: servala/servala-portal#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "1-initialize-project"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ref #1
base.html
to servala.frontend and make sure templates and static files (via whitenoise) workOpen questions
Docker setup: only for production or also for development?Default timezone when displaying data to usersIs logging to stdout sufficient, or should there be log files?I added an initial version of a Dockerfile. While it builds, it doesn't run yet because it doesn't find the module.
Also, once we have static files configured, we need to uncomment "collectstatic" in the Dockerfile.
I've also added a pre-commit configuration to help with the coding standards defined in the README.
And there is an initial version of a Forgejo Action which will build and push the container image when the PR is merged to main (untested!).
Regarding the styling, do you think we could use https://github.com/unfoldadmin/django-unfold?
I haven’t worked with django-unfold before, but it looks straightforward.
It seems fairly young within the Django ecosystem (Django is old, 3 years is nothing), but I don't think that's a big issue – I only mention it because you said you wanted to build the project with as few external dependencies as possible. But as long as we just use it for display purposes (and don't rely on its extra features), that should be fine – in that case, rolling things back to the default admin would be as simple as removing all references to it and changing the base class back to the default Django base class.
I pushed a fix for the gunicorn problem – application still won’t start up, but that’s because it requires a
SECRET_KEY
(which is meant to come from a .env file).Thanks for your thoughts! You're right, adding this external dependency does bring certain risks. I think it's better to use a "plain" HTML template. I also discovered that Django Unfold uses TailwindCSS and not Bootstrap 5. TailwindCSS is much harder to work with for us non-frontend-devs, so we better stick with Bootstrap 5.
It's not easy to find a good Bootstrap 5 based admin template which is truly free (without many features hidden behind a proprietary "Pro" version). I found one which I think we can safely use: https://github.com/zuramai/mazer
I feel with
uv
we don't need Docker for development, so for now, we can see Docker for production.Browsers timezone.
stdout is sufficient
For the MVP: This would be done by the admin of the portal, it's not required to have this in self-service yet.
See https://kb.vshn.ch/appuio-cloud/references/architecture/control-api-billing-entity.html for how we do it in APPUiO today.
It is mandatory, with a default set to "VSHN". This information will never be set by the user, always by a portal admin or a system integration. This is later being used for the integration into Exoscale via the Open Service Broker API endpoint (see https://kb.vshn.ch/app-catalog/csp/exoscale/osbapi.html and the WIP
3641da770f/docs/modules/ROOT/pages/csp/exoscale/osbapiv2.adoc
).For the user: first name, last name, email, company. Nothing more is required yet.
As Django 5.2 will be out April 2 and afaik it will be the next LTS release, would it make sense to directly go with that version (even with a beta version right now)? Or should we wait and update once it's out?
Some related data modeling questions that we can discuss on Monday.
Next steps on my end after we’ve spoken on Monday:
I think then this PR would be considered done, and we could proceed with #5 in order to figure out login + basic templates, layouts, testing.
createuser
and
createsuperuser
` work 4dd7d8628d3a8ce694be
tod14b935242
WIP: Initialize Django projectto Initialize Django project