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
Should I use a custom user model or seperate models to store my data

Hello everyone. I'm kinda new to django and am looking for some guidance on how to set up my models. The webapp im building will record information such as name, phone num er and address when the user registers in addition to their email and password as login credentials.

I've always thought the login details should be kept seperate from the user information in terms of database design. So in cases like this, is it considered okay to just abstract the user model to store all I need and the login info, or should I have 2 seperate models?

I should also add I have other models that are linked to the user via foreign key.

/r/djangolearning
https://redd.it/182rbqq
Why not?

Yesterday, I came across a series of fun demos about browser windows acting as one.

So... I thought... us backend devs can do it too 💪🤣. I know it's not the same, but it was a fun experiment. sharing the results!


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

Repo: https://github.com/joelibaceta/webcam-fixed-terminal Let me know if you liked it by leaving some stars! ⭐️

/r/Python
https://redd.it/182uvzv
Need help with a QA reporting tool

Hey, I am looking to find a QA reporting tool on a Black Friday Deal, where I can record the bugs as videos and share them using a link.

I have found this tool disbug.io with a lifetime deal for 89$, does anyone here have experience using this? would like to know if it’s worth it.

Also please share any other recommendations. Need a tool like this desperately as this saves me hours on the daily workflow.

/r/flask
https://redd.it/182qwpw
form wont save to database? Unsure how to troubleshoot it.

Trying to get create a form to submit a workorder to my database. However, cant seem to get it to actually submit.

[views.py](https://views.py)

from django.shortcuts import render, redirect
from django.http import HttpResponseRedirect
from django.contrib import messages
from .forms import Work_OrderForm


# Create your views here.
from .models import Work_Orders, Room


# @login_required
def getWorkOrders(request):
woAll = Work_Orders.objects.all().order_by(
'-created_date').order_by('-created_time')
woCount = Work_Orders.objects.all().count()
woComplete = Work_Orders.objects.filter(is_complete=False).count()

context = {
'woAll': woAll,
'woCount': woCount,
'woComplete': woComplete,
}


/r/djangolearning
https://redd.it/18336kt
Saturday Daily Thread: Resource Request and Sharing! Daily Thread

# Weekly Thread: Resource Request and Sharing 📚

Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!

## How it Works:

1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.

## Guidelines:

Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.

## Example Shares:

1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.

## Example Requests:

1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.

Share the knowledge, enrich the community. Happy learning! 🌟

/r/Python
https://redd.it/18363c8
simple-html 1.0.0 -- fast html rendering for people that don't like templates

I just released 1.0.0 of simple-html. As far as I can tell, it's typically faster than jinja2, django template rendering, dominate, and fast-html. It's type safe, straightforward, and doesn't try to do anything too complex.

I'd be interested in any feedback -- thanks!

pypi
github

/r/Python
https://redd.it/182yj2j
Large Scale LinkedIn Job Scraper

Hey everyone, over summer I created a LinkedIn scraper to clean and store almost all real time job postings, along with dozens of attributes. You should only need 3-4 accounts to keep it reliably running, since it utilizes targeted requests rather than loading entire pages.

Here’s the repo link:

https://github.com/ArshKA/LinkedIn-Job-Scraper

There are a lot of extensions you can create and attach on top of this code, for both market/industry analysis, and for personal use (such as implementing your own searching/filtering mechanism + easy apply script, social media bot, etc). Anyway, have a look and let me know if you encounter any problems.

Also, if you’re into data science, I posted a large chunk of scraped data on Kaggle which I’ll be updating, so feel free to check it out:

https://www.kaggle.com/datasets/arshkon/linkedin-job-postings

/r/Python
https://redd.it/1830b0q
Should I have seperate user and person models

Hello everyone. I'm kinda new to django and am looking for some guidance on how to set up my models. The webapp im building will record information such as name, phone number and address when the user registers in addition to their email and password as login credentials.

I've always thought the login details should be kept seperate from the user information in terms of database design. So in cases like this, is it considered okay to just abstract the user model to store all I need and the login info, or should I have 2 seperate models?

If seperate models is the way to go, how would I go about providing the user id to the person model if they're created on the same form?

/r/django
https://redd.it/183c39r
P Yolov8 hyperparameters for best generalization

I’m training an object detection model on yolov8 but my training data is a little biased because it doesn’t represent the real life distribution.
(I want to count objects of one class but different shape in a video and need them to be detected with near equal probability. )
How can I make sure to generalise the model enough so that the bias doesn’t have too much of an effect?
I know it will come with more false positives, but that’s not a problem.

/r/MachineLearning
https://redd.it/183fxtq
Query data warehouse, display results in nice table and allow for edits to be pushed back to another table.

Title says it all. What is the best approach here using grid.js or something similar?

/r/flask
https://redd.it/183ifsv
Best relevant/real-world Django apps job seekers should make themselves...

Iam currently trying for a python django developer job as a career change after doing an internship, since the job market is shit and it will take some time to recover from it, Iam thinking of developing a practical application all by myself in the meantime , the kind that i will have to make after getting a job as a developer so that it will help me to master Django more efficiently and increase my chances of getting hired, what are the ones i should try ?, also it will be great if resources that will help me for this are suggested...


/r/django
https://redd.it/183jitc
Can I use Django admin on AWS Lambda?

AWS Lambda is serverless so it does not store any state. My application is made keeping that in mind (using token auth) however Django admin uses session auth which needs to store state so is there any I can use Admin in Lambda?

/r/djangolearning
https://redd.it/183o0v0
Sunday Daily Thread: What's everyone working on this week?

# Weekly Thread: What's Everyone Working On This Week? 🛠️

Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!

## How it Works:

1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.

## Guidelines:

Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.

## Example Shares:

1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!

Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟

/r/Python
https://redd.it/183xb5f
Frontend framework for a backend dev

I'm looking for a frontend framework to help me build a web app. I'm decent at writing basic CSS and JS however I find things like React a little too complicated, but I want something more modern than Bootstrap.

It seems like a combination of HTMX, TailWindCSS with Alphine.JS is popular. I'm a little worried about so many moving parts but open to try it if there isn't a single solution.

/r/django
https://redd.it/1840zbr
I have been practicing, would love code reviews.

https://github.com/imcyber0wl/myblog

https://github.com/imcyber0wl/zaudio (just finished this one, may take some time to stop showing the "str has no attribute append" error, too tired to reboot the instance lol, just refresh the page)

https://github.com/imcyber0wl/shoptest

Im still learning, so please be gentle. Also, yes the front end sucks because i hate making the front end.

/r/djangolearning
https://redd.it/183uvif
Help for sending information to my database

I am doing a project for university on my localhost, what is the most usefull way to catch information on a html form to mysql database ? If someone has the documentation or if someone could help me telling me how I can do it in a usefull way I would be very appreciated

/r/djangolearning
https://redd.it/183l5pa