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
Short Django Reset Password Tutorial

I published a short video earlier today based on a few requests. People have been asking for a tutorial on how to create reset password functionality with Django.

I use the built in functionality from Django, but I override the templates.

If you want to check it out, you can find it here:
https://www.youtube.com/watch?v=ZR8Ymkx30p0

I would love to hear what you think about the content and quality :-)

/r/djangolearning
https://redd.it/lf7d4e
Official Django IRC channels have moved

Relaying a statement sent to the DSF members list, which also now is [on djangoproject.com](https://www.djangoproject.com/weblog/2021/may/26/django-irc-channels-migration-liberachat/):

> At approximately 3 am UTC on May 26, 2021, the operators of the Freenode IRC network assumed control of the #django* channels on that network. This means that representatives of the Django community no longer retain the ability to enforce Django's Code of Conduct on the Freenode IRC network. Additionally, we do not have the ability to set a topic on Django-related IRC channels on this network.
>
> Please join us in #django and #django-dev on [Libera.Chat](https://libera.chat/) for discussion of the usage and development of Django, respectively. Additionally, you may refer to our documentation on [Contributing to Django](https://docs.djangoproject.com/en/dev/internals/contributing/#join-the-django-community) for some of the other options available to you for discussion of the usage and development of Django.

/r/django
https://redd.it/nlmuum
Implementing a wysiwyg editor - Mini tutorial

Hi!
I published a video yesterday where I show you how to implement a wysiwyg editor (CKEditor) to the Django Admin interface and also how to do it in the frontend. Plus, there are possibilities to upload images.

If you want to check it out, you can find it here:
https://www.youtube.com/watch?v=Rh7THG1-THU

It's around 17 minutes.

Feel free to ask questions or give me some feedback if you have any :-D

/r/django
https://redd.it/o5k033
Django - PostHog analytics

Hi guys, I'm adding PostHog to my site I'm wondering what's better, installing PostHog to the Django server or installing it to the JS.

I think the same question would be if I were using Google Analitycs instead of PostHog.

Thanks!

/r/djangolearning
https://redd.it/uy7awd
2022 State of Django Panel @ DjangoCon US

2022 State of Django Panel Topic ideas?
\#Django #News #Events #Releases


\+ Python relationship
\+ hot packages + stack trends
\+ people!
\+ learning
\+ contributions & releases


What do YOU think needs center stage attention? You can use this form to reply anonymously http://forms.microsoft.com/r/n5aKPx3QCw or reply to post.

/r/django
https://redd.it/wwn12e
Prefetchrelated and filtering

I was reading
django documentation about [prefetch related](https://docs.djangoproject.com/en/4.2/ref/models/querysets/#django.db.models.query.QuerySet.prefetchrelated)

And the next lines confused me a bit:

pizzas = Pizza.objects.prefetchrelated('toppings')
[list(pizza.toppings.filter(spicy=True)) for pizza in pizzas]


…then the fact that pizza.toppings.all() has been prefetched will not help you.
The prefetch
related('toppings') implied pizza.toppings.all(), but pizza.toppings.filter() is a new and different query. The prefetched cache can’t help here;

Can anyone explain what is meant by this? Why prefetch cache can't help in such cases?

/r/django
https://redd.it/13232zy
Introducing drf-api-action : Empowering Django REST Framework with Enhanced Functionality

Hi all,

I created a project named drf-api-action which Obtains web framework benefits for making API Python packages

What is drf-api-action?

drf-api-action is an ingenious extension to the popular rest_framework package, introducing a decorator called api_action.
Building upon the foundation of the existing action decorator, this new addition transforms a REST API call in a class view into a straightforward function call.
With this decorator, you can effortlessly create an instance of the view and explicitly invoke its functions.

Key Benefits:

1. Arguments Validation: Ensure the integrity of your API by effortlessly validating arguments.
2. Pagination: Seamlessly implement pagination within your API functions.
3. Clear Separation of Concerns: Enjoy a clean separation between function signature and business logic, enhancing code readability.
4. Database Model Accessibility: Easily access Django DB models in other libraries or web services.

And Many More! : drf-api-action opens the door to many advantages, making DRF even more versatile for your projects.

GitHub Repository: Check out the code on GitHub

Dive Deeper on Medium: Read the in-depth article on Medium

If you find drf-api-action beneficial for your projects, show your support by starring the GitHub repository. Your stars help us grow and motivate us to continue enhancing this powerful tool for the DRF community.

# #Django #RESTFramework

/r/django
https://redd.it/186o89g