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
All jokes aside, the Django tutorial is one of the most organized and educational tutorials I've ever done.

It gently introduces you to every aspect of the framework so you quickly understand the "big picture" and provides you with additional links on each part if you want to dive deeper on your own. It also points out common errors that beginners get stuck on such as typing in [http://127.0.0.1:8000/](http://127.0.0.1:8000/) instead of [http://127.0.0.1:8000/polls/](http://127.0.0.1:8000/).

One other thing I liked was the tidbits about the design philosophy behind each part so we understand why we do this the way we do.

/r/django
https://redd.it/guuqw9
I made a coding interview site with video conferencing, collaborative code editing and remote code execution.

/r/Python
https://redd.it/gv2dy5
Can't create index page

I'm trying to make my app with blueprints and when trying to set up the index page it catches an error. Index is under Localito/core/views.py. I don't know what I'm doing wrong.

werkzeug.routing.BuildError: Could not build url for endpoint 'index'. Did you mean 'core.index' instead?

​

code: [https://github.com/halabito8/Localito](https://github.com/halabito8/Localito)

/r/flask
https://redd.it/guzuxb
what's the easiest way to get information on ipython release 5.10.0?

i noticed today that there is a new ipython release 5.10.0.

### what's the easiest way to get information on ipython release 5.10.0?

i tried readthedocs but they stopped at about 5.9 and for that release and earlier they only had like 1-3 high level bullet points.

i did find mention of the release on the github.com/ipython/ipython/releases but no summary.

### do i need to generate the release notes myself via https://github.com/github-tools/github-release-notes?

usually release notes are done by the project not the developer using the project.

---

i guess ipython-5.x is still getting a release because it supports python-2.7 and there's still a lot of python-2.7 users.

so maybe any ipython-5.x release won't get any release docs going forward.

/r/IPython
https://redd.it/gulyce
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/gv80nx
What is going on?

While using Jupyter Notebook after a short period of time the tab will get an hourglass in the corner. After waiting for several minutes the tab still won't run any code. By shutting down the notebook from the Home page and re-opening it, the notebook starts to work again until the hourglass appears and nothing works any more. Why is this happening?

/r/JupyterNotebooks
https://redd.it/guqmnz
I'm learning Digital Image Processing with opencv in Python at my university. Today I decided to write a script make deep fried memes. Link in my comments.

/r/Python
https://redd.it/gv2cu7
Can I automate a web scraping task that updates the django database?

I am working on an application that works with data which I have previously scraped from another website using Selenium. In order for my app to work with the most up-to-date data, I would like to set up a scheduled task that runs maybe twice a day to execute the script responsible for scraping said website.

Now I looked into this a little bit and see a lot of mentions of Celery as a scheduling tool. I was wondering whether it would be feasible for Celery to take care of running a Selenium driver.

I am planning to deploy this application to heroku and ideally the updating of the database would be fully automated once the application is live.

Can anyone confirm that this is feasible and potentially point me to some resources that will get me started?

Thank you

/r/django
https://redd.it/gvc9e3
How to Create a Grocery Delivery And Pick-up Service App in Python

In this project, we will build an online grocery store web application using Django 3.0 and PostgreSQL with third-party libraries.

[https://www.education-ecosystem.com/brahim\_chougrani/2PEBk-how-to-create-instacart-clone-with-django/voGEG-porject-introduction/](https://www.education-ecosystem.com/brahim_chougrani/2PEBk-how-to-create-instacart-clone-with-django/voGEG-porject-introduction/)

/r/djangolearning
https://redd.it/gvee7s
What are the exact uses of flask's SECRET_KEY

Hi, I just finished my project which I built with flask and I'm still not sure what the SECRET\_KEY is used for.I saw multiple answers over the web and wanted to be sure what's the correct one.I saw that the SECRET KEY is used for:

1. The csrf token in the forms ( { form.csrf\_token } ).
2. To encrypt the session id in the cookies (or something like that).

I want to know which one is correct (maybe both)My second question is: Is wekzeug.security.generate\_password\_hash uses it as well?

/r/flask
https://redd.it/gvekun
Integration with PostgreSQL: for a newbie

Hey All,

I am new to Django, could someone explain how Django integrates with PostgreSQL? I don't understand why my Django app is throwing errors, it is saying that my IP address is not found, yet I am running it on localhost.

/r/django
https://redd.it/gvljrx
Any suggestion to find a remote Python job ?

I have worked as a python engineer(good at Django,Flask, Celery,MySQL, redis, influxdb and so on) for two years in China. Recentlly I am thinking about to find a remote job ,can anyone give me some suggestion ? THX:)

/r/django
https://redd.it/gvotnm
I'd like to host a small Flask project, and I had some questions about the database

I've been using sqlite 3 for development, and I found the options of Postgresql or Mysql if I want to host my project and have other people use it.

Does anyone have any recommendations on which one to use? I think that the one I use will be dependent on whether I can find a free plan for the database on a host. I do not want to pay for a database because this is a learning project. A database host with a limited free plan will be great, so which one do you recommend?

Free Postgresql:

* Heroku
* [https://www.elephantsql.com/plans.html](https://www.elephantsql.com/plans.html)

Free Mysql:

* [https://remotemysql.com/](https://remotemysql.com/)
* [https://www.freemysqlhosting.net/](https://www.freemysqlhosting.net/)
* [https://www.db4free.net/](https://www.db4free.net/)
* [https://www.freesqldatabase.com/freemysqldatabase/](https://www.freesqldatabase.com/freemysqldatabase/)

Which one would you recommend?

Another question, should I download ALL of the database devtools for postgresql and mysql to my computer? I'd like to view the database directly and make changes if required, but I was wondering if you think Flask-Admin is enough

/r/flask
https://redd.it/gvotyl
Periodically update information on a page without reloading

I would like to have my program automatically updating stock prices, percentage change, etc. of certain stocks (that I'll have listed in a file) on a Flask website every minute.

How would I go about doing this? How can I periodically retrieve and update the information every minute without reloading the page? From some research, I understand that you have to do it with AJAX, but I do not understand fully how to implement it. Is there a better/easier way to do it with Flask?

Any help is appreciated!

/r/flask
https://redd.it/gvrg9b
Noob Question : When to use third party apps/packages/libraries instead of creating my own solution?

Lets say I want to make a SaaS or production quality projects in Django. Should I build everything from scratch and use only the popular 3rd party apps like allauth etc and build everything else from scratch. Or should I use 3rd party solutions wherever it fits and saves me time and effort?


Also, What are the best practices while using 3rd party apps?


P.S. - Can mods add an ASK flair?


TIA!

/r/django
https://redd.it/gvtl8r
This media is not supported in your browser
VIEW IN TELEGRAM
Finished a program that draws images with epicycles!

/r/Python
https://redd.it/gvnyx5
How to know if a bound method needs (self, obj) arguments?

In writing a method for an admin.TabularInLine object where I wanted to render an image inline when viewing its parent object, I discovered that I had to pass in two arguments (self, obj) rather than just one (self). So far, whenever I've added functions to models, I've always just passed in (self).

How would I know how whether I had to include either or both of those particular arguments? Is it in the documentation somewhere? Thanks

EDIT:

class ImagesInLine(admin.TabularInline):
model = Images
readonly_fields = ('image_html',)
fields = ('image_html','image', 'order', )

def image_html(self, obj):
html = '<a href="None" target="_blank"><img src="None" /></a>'
return format_html(''.join(html.format(url=obj.image.url)))

/r/djangolearning
https://redd.it/gw07a5