Friday, October 1, 2021

Strange ValueError in Safari on iOS

In the error message below that "icon-yes.svg" is named in
django/contrib/admin/static/admin/css/base.css

ul.messagelist li {
    display: block;
    font-weight: 400;
    font-size: 13px;
    padding: 10px 10px 10px 65px;
    margin: 0 0 10px 0;
    background: var(--message-success-bg) url(../img/icon-yes.svg) 40px
12px no-repeat;
    background-size: 16px auto;
    color: var(--body-fg);
}

I haven't seen the error with Mozilla Firefox or Google Chrome so I'm
guessing it is something to do with Apple and treatment of trailing slashes.

my setting is APPEND_SLASH = True which was set after much trial and
error long ago so I'm not keen to try and remember all that experiment
with it again.

Thanks for any help

Cheers

Mike


ValueError at /admin/chemical/chemical/29/img/icon-yes.svg/change/

Field 'id' expected a number but got '29/img/icon-yes.svg'.

Request Method: GET
Request URL:
https://xxxxxxx.xxx/admin/chemical/chemical/29/img/icon-yes.svg/change/
Django Version: 3.2.7
Exception Type: ValueError
Exception Value:

Field 'id' expected a number but got '29/img/icon-yes.svg'.

Exception Location:
/usr/local/lib/python3.6/dist-packages/django/db/models/fields/__init__.py,
line 1827, in get_prep_value
Python Executable: /usr/bin/python3
Python Version: 3.6.9



--
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0e7c9731-18bc-f119-f83b-617c1709cff7%40dewhirst.com.au.

No comments:

Post a Comment