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
Chat implementation

Guys any idea about implementing chat on django like realtime without redis .. only over https .

/r/django
https://redd.it/12u8yp2
Where can I deploy websites that using python as a backend (web applications)

hello, I need a host that I can buy and use to deploy my web apps, the cheapest ever.
and if it possible that I deploy several webapps it would be amazing, as I need something to deploy all my projects on, and is this even possible?

/r/Python
https://redd.it/12v0d0e
Jupyter doesn’t show my files.

When going through the files in jupyter notebooks, I can’t find the files that are on my computer. If I follow the same file in my explorer and on jupyter, jupyter only shows me older folder names with the old files. If I change the folder name and whatever is in it, jupyter doesnt update it.

/r/JupyterNotebooks
https://redd.it/12vaewb
Display information from another model in another admin model

I have two models in my Models.py; "Award" and "Status"

There is a link from User to Status to mark who made the update, from their the Status is linked to Award. This allows a user to update the status of a specific award over a period of time. It also ensures that if multiple people work on it and update the status it reflects the correct person who made the update. This is because the whole thing needs to be tracked each time someone "touches" it. Nothing can be deleted.

I would like to display the most current status inside the Admin table (where all awards would be list).

Here is my models.py.

class Award(models.Model):
datecreated = models.DateTimeField(autonowadd=True)
date
modified = models.DateTimeField(autonow=True)
first
name = models.CharField(maxlength=50, verbosename = "First Name")
lastname = models.CharField(maxlength=50, verbosename = "Last Name")
rank = models.CharField(max
length=5, default=None,
choices=RANKCHOICES)
unit = models.CharField(max
length=6,

/r/djangolearning
https://redd.it/12vjqp8
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/12vod9k
This media is not supported in your browser
VIEW IN TELEGRAM
[P] I built a tool that auto-generates scrapers for any website with GPT

https://redd.it/12v0vda
@pythondaily
Thought you might like my Todoist dashboard

Hello,

Long time lurker.

I'm a huge fan of Todoist and use it every day for work. One feature that I felt was missing though, was a nicely laid out, clean dashboard which would just show my tasks for that day.

So, I built one!

Originally it was just for personal use, but a few others at work liked it and wanted access, so I've made it available for free.

This is the first release, and I'm not a professional coder, so I'm sure there will be some bugs, but I'd appreciate any feedback and hope some might get some use from it.

https://www.today.ninja

Thanks,

/r/flask
https://redd.it/12vp3id
AttributeError with Psycopg3 vs Psycopg2

# Anyone having issues using psycopg 3.1.8 on Django 4.2?

On Psycopg2 (psycopg2==2.9.6), everything works fine.

On Psycopg3 (psycopg==3.1.8), somethings work fine.

* I can make migrations
* I can CRUD from the shell
* **However I can not connect to the server**

​

Traceback (most recent call last):
File "/home/username/server/web_app/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/utils/deprecation.py", line 133, in __call__
response = self.process_request(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
request.site = get_current_site(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/shortcuts.py", line 16, in get_current_site
return Site.objects.get_current(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/models.py", line 59, in get_current
return self._get_site_by_id(site_id)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/models.py", line 30, in _get_site_by_id
site = self.get(pk=site_id)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/db/models/query.py", line

/r/django
https://redd.it/12vp8j9
As if there weren't enough packaging tools already: mitsuhiko/rye: an experimental alternative to poetry/pip/pipenv/venv/virtualenv/pdm/hatch/…
https://github.com/mitsuhiko/rye

/r/Python
https://redd.it/12w2ws7
Question about unit testing

Suppose I have a User entity and I have this business rule: usernames should be saved in lowercase letters.

If we need to enforce this rule with a test, what layer does this test belong to?

Controller? Service? Domain model? Repository? Integration test?

What layer should this test live in?

/r/Python
https://redd.it/12wcyf0
Library installation not working

/r/JupyterNotebooks
https://redd.it/12wh47z
Trying out tunnel.dev

Hey, what's up, everyone? I'm building a startup called Tunnel. Tunnel is a super fast way to get a locally running app on the web, and it comes with a bunch of tools for collecting feedback like commenting and video chat.

I would love it if you all could check out our docs and give me some feedback! Here's the link: https://docs.tunnel.dev

I'm also happy to answer any questions you have, like "Why is Tunnel better than ngrok?"

Thanks, builders!

/r/flask
https://redd.it/12wksay