Questions tagged «django»

1
brew install gettext,我应该强制链接吗?
我正在做一些Web开发,翻译引擎需要gettext。我应该强制链接吗? $ django-admin.py makemessages -l es CommandError: Can't find xgettext. Make sure you have GNU gettext tools 0.15 or newer installed. $ brew install gettext Warning: gettext-0.18.3.2 already installed $ brew link gettext Warning: gettext is keg-only and must be linked with --force Note that doing so can interfere with …




1
Django + Daphne + Caddy +文件上传= 413错误
我有一个与Caddy一起部署,生产的Django Web应用程序。在制作中,我使用Caddy作为指向daphne的反向代理,指向我的Django应用程序。但是,当我尝试将文件上传到生产中的管理门户时,我收到413错误。在调试模式下,当我刚刚使用Django时,我没有收到此错误。有人有主意吗?这是我的Caddyfile: 0.0.0.0:2015 on startup daphne peptidedb.asgi:application & header / { -Server # be sure to plan & test before enabling # Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" Referrer-Policy "same-origin" X-XSS-Protection "1; mode=block" X-Content-Type-Options "nosniff" # customize for your app #Content-Security-Policy "connect-src 'self'; default-src 'none'; font-src 'self'; form-action 'self'; frame-ancestors 'none'; img-src …

1
sslv3警报握手失败(_ssl.c:590)?
这是我的代码: def test(request): paypalrestsdk.configure({ "mode": "security-test-sandbox", "client_id": "XXXXXXX-XXXX-XXXX-XXXX", "client_secret": "XXXXXXX-XXXX-XXXX-XXXX" }) payment = paypalrestsdk.Payment({ "intent": "sale", "payer": { "payment_method": "credit_card", "funding_instruments": [{ "credit_card": { "type": "visa", "number": "4417119669820331", "expire_month": "11", "expire_year": "2018", "cvv2": "874", "first_name": "Joe", "last_name": "Shopper" }}]}, "transactions": [{ "item_list": { "items": [{ "name": "item", "sku": "item", "price": …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.