Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Paypal, Django, Local Bank, Integration

I'm thinking about making a web system where people can send me money through their local bank account for buying an online item and I'll buy them that item using my paypal account. So this would be 2 step process. At first they will send me money through their local account and then I'll convert that money into paypal dollars and use those dollars to buy that item for them. I want to know is that possible and if it is, then from where should I start?

/r/djangolearning
https://redd.it/7etabj
Best API for scheduled tasks currently?

I need to set up automatic scheduled tasks. The tasks are pretty simple, like set `is_active_subscriber` to `False` when a user's subscription ends and auto-renewal is off.

I'm aware of cron, but I see that it hasn't been updated for a few years. For simple scheduled tasks, what API is the best option right now?

Thanks.

P.S. I'm building a MVP so I'll be expecting only a small amount of traffic when I first go live. So whatever method I end up using, it should be sufficiently scalable.



/r/django
https://redd.it/7fzled
I'm releasing a free code for the "Automate the Boring Stuff with Python" Udemy course

Use this link to sign up for the "Automate the Boring Stuff with Python" Udemy online course: https://www.udemy.com/automate/?couponCode=PY_ALL_THE_THINGS

It's free until the end of Friday, Dec 1, 2017. Afterwards it goes back to its normal $50 price. (Though you can use this link https://www.udemy.com/automate/?couponCode=FOR_LIKE_10_BUCKS to buy it for $10. And it's an open secret that if you browse Udemy in privacy mode, they'll show you the discount price to lure in a "new" customer. But course creators get a much larger cut when people use their referral codes.)

The course follows the book of the same name, which is available for free, in full, at https://automatetheboringstuff.com under a Creative Commons license. ([Which I encourage you to use to share your own creative works.](https://creativecommons.org/licenses/))

The course is 50 videos and made for people with no previous programming experience. The first 15 videos are free to view on YouTube: https://www.youtube.com/watch?v=1F_OgqRuSdI&list=PL0-84-yl1fUnRuXGFe_F7qSH1LEnn9LkW

And now I will go self-flagellate to atone for my part in legitimizing "cyber monday".

/r/Python
https://redd.it/7fxp46
Free Python Games - Basic Python Games for Beginners
http://www.grantjenks.com/docs/freegames/

/r/Python
https://redd.it/7fzu88
Django URL Issue

I am building a blog. In the navigation menu, there are options for going through "Home" (which is index.html) and "Blog." "Home" is not working unless I place the index.html in the static folder and insert the following line in the code of navigation menu:
<a href="{% static "html/index.html" %}"

In short, when I click on "Home," the URL is being displayed as "http://127.0.0.1:8000/static/html/index.html" in the browser. But when I click on "Blog," the URL becomes "http://127.0.0.1:8000/blog/", which looks to be pretty standard. How can I change "http://127.0.0.1:8000/static/html/index.html" to simply "http://127.0.0.1:8000/index/".

I am a beginner. So, pardon if I make any silly mistake.

/r/djangolearning
https://redd.it/7g2f5h
i wrote a script to make it easier to update my pythonAnywhere server whenever my code changes, help me make it better !

Hello !

Whenever I am happy with my code, I commit it to my Git repository, sync it up, and then use the following two files :

## update.bat
set login=brachamul
plink %login%@ssh.pythonanywhere.com -m update.txt
@echo "Work complete !"
This will open an SSH connection with pythonanywhere, and call my script from there.

## update.txt
echo
echo [Pulling from git]
git pull
echo
echo [Collecting static files]
workon MyEnv
python manage.py collectstatic --noinput
echo
echo [Migrating]
python manage.py migrate
echo
echo [Testing new setup]
python manage.py test
echo
echo [Reloading web app]
touch /var/www/www_mysite_com_wsgi.py

This will pull the new code from git, reload static files, migrate if migrations are needed, trigger the tests (but won't change anything if the tests are wrong, I don't know how to do that) and finally reload the app.

How can I improve on this code ? How do **you** do it ?

/r/djangolearning
https://redd.it/7elu71
What's everyone working on this week?

Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.


/r/Python
https://redd.it/7g4dnf
Need some help upon the approach to solving a problem

So I followed the Django polls app from the django official tutorial and found this another [link on gists](https://gist.github.com/inglesp/8866459) which talks about extending that polls app with some extra features. I tried it, was able to do a few but not all.

For example, there's a index view in the polls app which displays the last 5 submitted questions, so the extending features talks about adding the date which was published along with the text which is easy because it's just another variable but it also asks to include total no of votes casted on all choice of the question, which also seemed doable at first, cuz it's just looking through the question.choice_set.all and summing up the votes of each choice, but then such calculation are not allowed or advised to handle in a template. So my doubt is how to handle those in a view and pass it into a template. Noob here. Kindly help me out.


I am not expecting the exact answer, just how to go about it any guidance on how to achieve the task.

/r/djangolearning
https://redd.it/7g67yj
Save/send an image with Django channel?

Guys, I have made a chat application with Django channels. I want to add image uploading in this chat app. Has anyone done this? can you please guide me, how can I do this?
Thanks

/r/django
https://redd.it/7g63es
[D] Dress code at NIPS?

I am attending NIPS next week and this is my first time ever attending this conference (or any top-tier ML conference). I have been to a lot of medical, visualization, and lower tier ML conferences. I have a couple of questions:

1. At many of the medical and other conferences, you see most people in business casual (dress shirt with tie) or even with full suits. From what I understand, NIPS is nowhere near this case (which sounds awesome). What should I expect? Khakis with a casual button down? Or just jeans with a t-shirt? What about if speaking to companies at booths?

2. Piggy backing on the last part of the first question, I have seen that there will be a lot of companies at NIPS. As somebody finishing my PhD next year, what is the best course for exploratory talks with companies? And similar to the first question: are any of these conversations like a normal interview where proper dress code is expected?

I am excited to attend NIPS for the first time, and as is probably evident…I am trying to break away from the strict dress code expected at some other conferences.

(Reposted with Discussion tag.)

/r/MachineLearning
https://redd.it/7g7255