Add version (0.1.0) and a Settings -> About page
Single source of truth: __version__ in daybook_project/__init__.py, starting at 0.1.0. Surfaced in two places from that constant: - Settings -> About page (logo, name, version, description), in the settings nav and linked from the gear menu. - GET /api/capabilities now includes "version", so the deploy agent / tester can confirm which version is actually running. Release flow: bump __version__, commit, `git tag vX.Y.Z`, push tag, deploy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ca8e364010
commit
16737f3ff4
7 changed files with 63 additions and 0 deletions
|
|
@ -307,8 +307,11 @@ class CapabilitiesView(APIView):
|
|||
def get(self, request):
|
||||
if not request.user.is_authenticated and resolve_token_user(request) is None:
|
||||
return HttpResponseForbidden("Login or a valid API token is required")
|
||||
from daybook_project import __version__
|
||||
|
||||
return Response(
|
||||
{
|
||||
"version": __version__,
|
||||
"artifact_kinds": [choice[0] for choice in Artifact.KIND_CHOICES],
|
||||
"filters": ["source", "label", "day", "kind", "q"],
|
||||
"views": ["rendered", "raw"],
|
||||
|
|
@ -1249,6 +1252,17 @@ def settings_users(request):
|
|||
)
|
||||
|
||||
|
||||
@login_required
|
||||
def settings_about(request):
|
||||
from daybook_project import __version__
|
||||
|
||||
return render(
|
||||
request,
|
||||
"artifacts/settings_about.html",
|
||||
{"active_section": "about", "version": __version__},
|
||||
)
|
||||
|
||||
|
||||
@login_required
|
||||
def settings_demo_data(request):
|
||||
if request.method == "POST":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue