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
"anaconda-navigator" isn't opening on qiskit environment, but it opens on base env.

​

I thought all new anaconda venvs come with anaconda-navigator installed

/r/IPython
https://redd.it/l307wj
Saturday Daily Thread: Share your resources!

Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?

Use this thread to chat about and share Python resources!

/r/Python
https://redd.it/l30jfa
Django Accountancy Software - my first app

Hi guys,

I have just finished my first ever full stack web app, which is built with django of course. It is an open source accountancy app based partly on Xero, one of the leading products in the market, but with some differences. It is by no means a complete accountancy system but I hope it would serve as a good basis for one.

The live demo (also on the github repo mentioned below) is at - https://django-accounts-1.herokuapp.com/ if you want to check it out. There is no need to supply your email address to sign up.

There is also the option to deploy to our own dyno on Heroku if don't want to share data with randomers. Again the link is in the github repo below.

I welcome any constructive feedback. Especially since I would like to switch careers to web development sooner rather than later.

Hope you enjoy it!

Github repo - https://github.com/rossm6/accounts

P.S.

Please view the website in the latest Chrome, Firefox or Edge browser. Safari has not been tested but probably works. It is also built for the desktop and not smaller screens.

/r/django
https://redd.it/l30tsv
Easiest way to unlink Django's port 8000 when restarting server

Hi guys, I frequently find myself needing to ctrl z the server to make non-live modifications, or it goes down, etc. Whenever I restart, whatever process the interrupt goes through means Django didn't actually stop using port 8000, so it's still linked and won't let me restart. Besides greping for django and killing it, is there either a better command to terminate the server, or a more efficient way to unlink the default port (so I don't need to keep changing it)?

/r/django
https://redd.it/l30ui5
"flask run" doesn't work but "python flaskFile.py" does?

This is probably a really dumb problem but it's been driving me crazy for hours. I am new at this and I just can't figure it out.

Basically, when I try to do the command "flask run" it gives me the error that "The system cannot find the file specified". However, when I try "python flaskFile.py" it does run the application. I have a .flaskenv file that defines FLASK_APP=`flaskFile.py` and FLASK_ENV=development. Also, before doing flask run I did python -m venv venv and then venv\Scripts\activate.

This is the exact error:

https://preview.redd.it/9dv1w3cwk0d61.png?width=1372&format=png&auto=webp&s=64e89d5ef4b01236347f2a7d3367fb3ef8735ac8

This is what my files look like. The application is in a folder called backend which is inside of a file called DECENT:

https://preview.redd.it/oz8n5xl5l0d61.png?width=944&format=png&auto=webp&s=4b31a55c8ac7efe4e53575857bf9b0e97b8f3f8d

In venv there is a Scripts folder where I put the .flaskenv file:

https://preview.redd.it/apkfd5ybl0d61.png?width=931&format=png&auto=webp&s=d5fdcbbd4faddf3af6fd698753235134e908e771

I've tried putting the .flaskenv file in other locations but nothing is working. This is the tutorial I've been following: https://blog.miguelgrinberg.com/post/how-to-create-a-react--flask-project.

Thanks in advance, I am super desperate here and I am eternally grateful for any response.

/r/flask
https://redd.it/l35r3h
Django Online Studying App - Django + React - Feedback Please

Hey everyone!

First time working with Django + React. I built a free service where people can track and share everything their studying online. It's very early beta, but I would love some feedback. I've worked with Django quite a lot before, but not with DRF and pretty inexperienced with React. I originally built a version of this website with Node+React, but I really missed the structure of Django so I built it back from scratch.

https://stublio.com/

Feel free to be critical and harsh, I am very open to suggestions and ideas.

This is my profile: https://stublio.com/codemonkey

I haven't worked this in-depth with DRF before, and it's been amazing so far. I am learning the beauty of serializers and just how powerful DRF is out of the box.

Would also love input on validation with this stack. Typically I've had forms.py take care of that, but now I'm not quite sure where the best place to validate is. I could do it in React+views+models, but is that kind of overkill? So far, I've done almost 0 validation (early beta).

Also, within the profile page, there is a feature to filter by tags. I do that logic in React right now, I wonder if it's better to just

/r/django
https://redd.it/l347hh
Can anyone give me an example to display an image with bytea datatype from a postgresql table in a html page with flask ?



/r/flask
https://redd.it/l3bz87
how to make edit user profile page using Django without using Django forms??

I created this type of sign in and login views using User model ,without using Django forms how can make edit profile page view? please help me. I have not used Django form

https://preview.redd.it/nj9cwsrpg3d61.png?width=1920&format=png&auto=webp&s=12ead27814d144289f24d8ee9936d810eee46810

/r/django
https://redd.it/l3d89s
PWA

have you ever converted Django into Progressive Web App?

/r/djangolearning
https://redd.it/l36zze
Colorpedia – Command-line tool for looking up colors

Colorpedia is a command-line tool for quickly looking up colors, shades and palettes.

Supported color models: HEX, RGB, HSL, HSV, CMYK

https://i.redd.it/hkcizzp204d61.gif

/r/Python
https://redd.it/l3fad6
Sunday Daily Thread: 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/l3nwc0
Because is not easy to find Django jobs opportunities I created a telegram group with Django jobs I fund on the Internet +30 published today and counting.

Hello everyone I just created a group of Django Jobs, right now it has +30 jobs, my goal is to keep it updated and created a community of people sharing jobs related to Django https://xn--r1a.website/djangojobs

Let's create community!

/r/django
https://redd.it/l3ovs2
gerdemb/shashin Find duplicate images using perceptual hashing which can match similar images even if they have been resized, edited or had changes to their metadata (EXIF) tags, etc.
https://github.com/gerdemb/shashin

/r/Python
https://redd.it/l3mgdq
Celery Broken After Upgrading DJ to 3.1

Hello everyone,

I was running Celery 4.4.7 when I upgraded Django to 3.1. This ended up breaking it, and in `/var/log/celery/proj_worker.log` I got the error `ImportError: cannot import name '_lazy_re_compile' from 'django.utils.regex_helper'`

To attempt to resolve this, I've upgraded celery to 5.0, but now none of my tasks work at all.

When I run `celery -A proj beat -l debug`, celery beat does not start, saying:

celery beat v5.0.5 (singularity) is starting.
__ - ... __ - _
LocalTime -> 2021-01-24 13:55:15
Configuration ->
. broker -> redis://localhost:6379//
. loader -> celery.loaders.app.AppLoader
. scheduler -> celery.beat.PersistentScheduler
. db -> celerybeat-schedule
. logfile -> [stderr]@%DEBUG
. maxinterval -> 5.00 minutes (300s)
[2021-01-24 13:55:15,070: DEBUG/MainProcess] Setting default socket timeout to 30
[2021-01-24 13:55:15,070: INFO/MainProcess] beat: Starting...


/r/djangolearning
https://redd.it/l3zzk5
os.path vs pathlib?

One short question, how and when do you use this modules?

​

For a very long time I only used os.path, but recently I discovered pathlib. My short answer:

os.path, if I just want to check if the path exists or just a few actions.

And pathlib for complicated tasks, like a base folder in various functions or class.

​

What do you think about this?

/r/Python
https://redd.it/l45ojr
This media is not supported in your browser
VIEW IN TELEGRAM
Improved autocompletion in JupyterLab with the LSP

/r/JupyterNotebooks
https://redd.it/l47doj