Replace the FastAPI/SQLAlchemy/Alembic web service with a Django project
laid out like cumorah-build: manage.py at the root, settings in the
privatestudio.settings package (base/dev/production), and a
privatestudio.studio app.
- Studio model owns a unique bucket_name; access is granted through
membership in the studio's auth Group. Assets, profiles and jobs are
scoped to a studio; API keys and S3 credentials stay per user.
- JSON API via Django Ninja under /api/ (profiles and transcode jobs now
live under /api/studios/{bucket}/).
- S3-compatible interface as plain class-based views under /s3/,
supporting bearer tokens and AWS v4 signatures.
- create_studio and create_key management commands replace ps-serve.
- Fresh Django initial migration; tests ported to Django TestCase.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
415 B
Python
11 lines
415 B
Python
from django.urls import re_path
|
|
|
|
from privatestudio.studio import s3_views
|
|
|
|
# re_path without trailing-slash requirements so APPEND_SLASH never redirects
|
|
# (a redirect would invalidate AWS v4 signatures).
|
|
urlpatterns = [
|
|
re_path(r"^s3/(?P<bucket>[^/]+)/?$", s3_views.BucketView.as_view(), name="s3_bucket"),
|
|
re_path(r"^s3/(?P<bucket>[^/]+)/(?P<key>.+)$", s3_views.ObjectView.as_view(), name="s3_object"),
|
|
]
|