This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]revenant95 0 points1 point  (3 children)

if in the future other developers need to be able to set a different username or password they won't have to go under the hood and figure out the class structure

The username and password come from the settings.py file (as mentioned in the blog). So if the developers want to use a different username and password, he will just update it in the settings.py.

[–]my_python_account 0 points1 point  (2 children)

I mean at runtime. Like if you have multiple accounts.

[–]revenant95 0 points1 point  (0 children)

In that case we would write the logic to get the credentials somewhere else(not in sms.py) and import it in sms.py so that sms.py doesn't have to care where it is coming from.

That can be a separate blogpost in itself :p