natus wheel: ASC/MC angles — tooltips, aspect lines, section headers, tooltip polish
- ASC/MC clickable w. DON/DOFF aspect lines (fixed: open w.o. lines; DON/DOFF both work; angles ring handled in _toggleAspects; lines origin at R.planetR) - btn-disabled click-through fix: pointer-events:auto on DON/DOFF; bounding-rect workaround removed - planet tooltip: applying ⇥ left, separating ↦ right; sign shown for angle partners - sign tooltip: Planets + Cusps section headers; ordinal house + domain; em-dash fallback - house tooltip: Planets header; Angular/Succedent/Cadent + phase labels; em-dash fallback - element tooltips: Planets header for Fire/Stone/Air/Water; Stellium/Parade as section-header labels; compact single-stellium Tempo; Parade sign : planets format - tt-ord: no negative margin in .tt-angle-house context Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -300,11 +300,24 @@ def _sky_natus_preview(request):
|
||||
|
||||
@login_required(login_url="/")
|
||||
def sky_view(request):
|
||||
chart_data = request.user.sky_chart_data
|
||||
birth_dt = request.user.sky_birth_dt
|
||||
saved_birth_date = ''
|
||||
saved_birth_time = ''
|
||||
if birth_dt:
|
||||
if request.user.sky_birth_tz:
|
||||
try:
|
||||
birth_dt = birth_dt.astimezone(zoneinfo.ZoneInfo(request.user.sky_birth_tz))
|
||||
except (zoneinfo.ZoneInfoNotFoundError, KeyError):
|
||||
pass
|
||||
saved_birth_date = birth_dt.strftime('%Y-%m-%d')
|
||||
saved_birth_time = birth_dt.strftime('%H:%M')
|
||||
return render(request, "apps/dashboard/sky.html", {
|
||||
"preview_url": request.build_absolute_uri("/dashboard/sky/preview"),
|
||||
"save_url": request.build_absolute_uri("/dashboard/sky/save"),
|
||||
"saved_sky": request.user.sky_chart_data,
|
||||
"saved_birth_dt": request.user.sky_birth_dt,
|
||||
"saved_sky_json": json.dumps(chart_data) if chart_data else 'null',
|
||||
"saved_birth_date": saved_birth_date,
|
||||
"saved_birth_time": saved_birth_time,
|
||||
"saved_birth_place": request.user.sky_birth_place,
|
||||
"saved_birth_lat": request.user.sky_birth_lat,
|
||||
"saved_birth_lon": request.user.sky_birth_lon,
|
||||
@@ -329,13 +342,23 @@ def sky_save(request):
|
||||
return HttpResponse(status=400)
|
||||
|
||||
user = request.user
|
||||
birth_tz_str = body.get('birth_tz', '').strip()
|
||||
birth_dt_str = body.get('birth_dt', '')
|
||||
if birth_dt_str:
|
||||
try:
|
||||
naive = datetime.fromisoformat(birth_dt_str.replace('Z', '+00:00'))
|
||||
user.sky_birth_dt = naive if naive.tzinfo else naive.replace(
|
||||
tzinfo=zoneinfo.ZoneInfo('UTC')
|
||||
)
|
||||
naive = datetime.fromisoformat(birth_dt_str.replace('Z', '').replace('+00:00', ''))
|
||||
if naive.tzinfo is None and birth_tz_str:
|
||||
try:
|
||||
local_tz = zoneinfo.ZoneInfo(birth_tz_str)
|
||||
user.sky_birth_dt = naive.replace(tzinfo=local_tz).astimezone(
|
||||
zoneinfo.ZoneInfo('UTC')
|
||||
)
|
||||
except (zoneinfo.ZoneInfoNotFoundError, KeyError):
|
||||
user.sky_birth_dt = naive.replace(tzinfo=zoneinfo.ZoneInfo('UTC'))
|
||||
elif naive.tzinfo is None:
|
||||
user.sky_birth_dt = naive.replace(tzinfo=zoneinfo.ZoneInfo('UTC'))
|
||||
else:
|
||||
user.sky_birth_dt = naive.astimezone(zoneinfo.ZoneInfo('UTC'))
|
||||
except ValueError:
|
||||
user.sky_birth_dt = None
|
||||
user.sky_birth_lat = body.get('birth_lat')
|
||||
|
||||
Reference in New Issue
Block a user