Files: prototype and documentation files on features, with versions. Adding, replacing or removing a file is a feature revision with a change note. Types come from the extension; uploads are capped at 25 MB and stored under opaque paths. Every file URL checks project access, then redirects to a short-lived signed URL on the bucket, or streams with nosniff and a CSP sandbox when no bucket is configured. HTML prototypes run in a sandboxed iframe without same-origin access. Threads: whole-file threads and pins at a point on an image, drawn as an SVG overlay in percentages. Pins are placed with number fields, or by clicking the image with JS. Implementations: name, link and status, plus a per-feature status grid stamped with the feature revision, marked behind when the feature changes, and confirmable without changing the status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.7 KiB
Python
45 lines
1.7 KiB
Python
import allauth.urls
|
|
from allauth.account import urls as allauth_account_urls
|
|
from django.contrib import admin
|
|
from django.urls import URLResolver, include, path
|
|
|
|
from intent.core import views
|
|
from intent.orgs.urls import invite_urlpatterns
|
|
from intent.projects.views import project_create
|
|
|
|
|
|
def _without_passwords(patterns):
|
|
"""allauth's URLs minus the password views: regular users sign in with a code only."""
|
|
return [p for p in patterns if not str(p.pattern).startswith("password/")]
|
|
|
|
|
|
account_urlpatterns = [
|
|
(
|
|
path("", include(_without_passwords(allauth_account_urls.urlpatterns)))
|
|
if isinstance(p, URLResolver) and p.urlconf_name is allauth_account_urls
|
|
else p
|
|
)
|
|
for p in allauth.urls.urlpatterns
|
|
]
|
|
|
|
urlpatterns = [
|
|
path("", views.home, name="home"),
|
|
path("admin/", admin.site.urls),
|
|
path("accounts/", include(account_urlpatterns)),
|
|
path("invites/", include(invite_urlpatterns)),
|
|
# Organizations own the rest of the URL space (see RESERVED_SLUGS in orgs and projects).
|
|
path("<slug:org_slug>/new/", project_create, name="project_create"),
|
|
path("<slug:org_slug>/", include("intent.orgs.urls")),
|
|
path("<slug:org_slug>/<slug:project_slug>/", include("intent.projects.urls")),
|
|
path(
|
|
"<slug:org_slug>/<slug:project_slug>/features/<str:feature_key>/files/",
|
|
include("intent.files.urls"),
|
|
),
|
|
path("<slug:org_slug>/<slug:project_slug>/features/", include("intent.features.urls")),
|
|
path("<slug:org_slug>/<slug:project_slug>/issues/", include("intent.issues.urls")),
|
|
path(
|
|
"<slug:org_slug>/<slug:project_slug>/implementations/",
|
|
include("intent.implementations.urls"),
|
|
),
|
|
path("<slug:org_slug>/<slug:project_slug>/", include("intent.comments.urls")),
|
|
]
|