thedevs_python | Unsorted

Telegram-канал thedevs_python - Python

4418

Part of @thedevs General Rules: @rulesforthedevs Only related to group topic (Python + Python Frameworks) Other @thedevs groups: https://thedevs.network

Subscribe to a channel

Python

Good idea, thanks! ^^

Читать полностью…

Python

Can you give that repo

Читать полностью…

Python

Yes
I used one 1 year ago

Читать полностью…

Python

Alright, I figured it out... seems like I just had to ask :D


If anyone else running into this issue in the future.

There is this config option:
- https://flask-security-too.readthedocs.io/en/stable/configuration.html#SECURITY_I18N_DIRNAME

It accepts a list of directories, the trick is that you have to add your own translations directory at the END to take precedence. So for now it looks like this to me:

SECURITY_I18N_DIRNAME = ["builtin", "translations"]


And putting just a single string in my .po file overrides just that single string in the translation.

Sorry for the noise everyone.

Читать полностью…

Python

by that I mean this structure. I put their .po file next to mine... (I assume the file name is the domain name) but

pybabel compile -d translations


does not pick it up, it only compiles my messages.po file.

Oh, I can make it do so, but specifying the domain using -D flask_security ... but the app still does not pick up the tranlsations.

Читать полностью…

Python

what for?

https://pypi.org/project/tls-client/

Читать полностью…

Python

What's your actual question. What are you trying to do?

Читать полностью…

Python

it's not the last error chatgpt will do

Читать полностью…

Python

Chatgpt gave the code so asking

Читать полностью…

Python

Errors are made to be read

Читать полностью…

Python

i mean do we still need context mangers to be used with 'with' statement?

Читать полностью…

Python

with operator is manage context by himself

Читать полностью…

Python

i think it is nepotism
cause it kinda meets the definition of nepotism

Читать полностью…

Python

i agree these Referrals do skip the interview and resume sending for me, they straightly put me in the place i must be

Читать полностью…

Python

Because you're getting them from your network I guessed it was through family and friends :'3

Читать полностью…

Python

Lemme go back to that projects.....

Читать полностью…

Python

Make a blog and post these there you silly
Someone will need these in future

Читать полностью…

Python

https://docs.python.org/3/library/ssl.html

Читать полностью…

Python

This comment here suggests that what I try is possible:
https://github.com/pallets-eco/flask-security/blob/c12fe92b34ec80b3a56f5cbc706372740eb63a17/flask_security/babel.py#L37-L40

Читать полностью…

Python

Hi guys! I have an issue I can't figure out myself.
I'm using flask-security in my project which ships it's own traslations (using pybabel)

Now, I don't really like the tone of the translation for a specific language in flask-security, so I would like to override the translation strings.

Is it possible to do from the top level project which is importing flask-security?

Flask-Security translations folder for reference: https://github.com/pallets-eco/flask-security/tree/main/flask_security/translations

It looks to me they use a different domain, that's why they have the fsdomain helper: https://flask-security-too.readthedocs.io/en/stable/customizing.html#localization But I'm not very familiar with how these domains work...

I tried copying their .po file to my project, but pybabel won't automatically compile it which suggests me that I'm doing it wrong...

Читать полностью…

Python

Maybe he is a C purist

Читать полностью…

Python

Do we have tls client in python

Читать полностью…

Python

You can avoid using with but it will end up looking like a c program

Читать полностью…

Python

Why would you want to manage resources manually, anyways?

Читать полностью…

Python

answer = await app.ask(
chat_id, text="Send me your Api key: ", parse_mode=enums.ParseMode.MARKDOWN
)

in pyrogram i am using this module

from pyroaddon import listen

but its not working for python 3.14 because of updated asyncio any alternative for this?

Читать полностью…

Python

Elaborate. Do you mean to ask if something other than a context manager can be used with the "with" statement, too?

Читать полностью…

Python

Do we still need to use context managers while using 'with' statement?

Читать полностью…

Python

i was second year when nfts were still around

Читать полностью…

Python

Wait, aren't you just in 2nd year??

Читать полностью…

Python

its not nepotism, its "Referral"

Читать полностью…
Subscribe to a channel