Files
links/core/urls.py
T
OpenClaw Sub-agent 8d05a11eb6 feat(invest): Add investment portfolio management feature
- Portfolio management (MOMO, IBKR personal, IBKR Yanhua)
- Stock holdings with transaction history (buy/sell)
- Weekly AI report generation
- Real-time price cache via Finnhub API
- Dashboard with tree view and performance charts
- REST API with AI-friendly batch update endpoint
- Management command for scheduled report generation

For大哥's personal investment advisor system.
2026-04-18 11:26:48 +10:00

38 lines
1.5 KiB
Python

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from django.views.static import serve
from links.views import LinkDetailView, LinkUpdateView, CustomLinkView
from django.urls import path, include, re_path
from django.conf.urls.i18n import i18n_patterns
urlpatterns = [
path('admin/', admin.site.urls),
# Add API URLs before locale URLs
path('api/', include('links.api_urls')), # New line for API routes
path('api/invest/', include('invest.urls', namespace='invest-api')),
# Media files
path('media/<path:path>', serve, {
'document_root': settings.MEDIA_ROOT,
}),
# Music files
path('music/<path:path>', serve, {
'document_root': settings.MUSIC_ROOT,
}),
path('i18n/', include('django.conf.urls.i18n')),
path('search/', include('links.search_urls')),
path('link/<int:pk>/', LinkDetailView.as_view(), name='link_detail'),
path('link/<int:pk>/edit/', LinkUpdateView.as_view(), name='link_update'),
path('custom/<slug:alias>/', CustomLinkView.as_view(), name='custom_link'),
path('custom/<slug:alias>/edit/', LinkUpdateView.as_view(), name='custom_link_update'),
path('invest/', include('invest.urls')),
# Include main app URLs with locale
path('', include('links.urls')),
]
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)