I Built a Django Package for Google Analytics Integration!
Hey everyone!
I created a Django package that makes it super easy to integrate Google Analytics GA4 into your projects. Here are some features:
Supports Universal Analytics & GA4
IP anonymization and cookie settings
Server-side tracking via middleware
Debug mode for dev environments
Event tracking & custom dimensions
Excludes staff users from tracking
Check it out here: PyPI 👈 github
Contributions are welcome on GitHub! Let me know what you think! 😄
/r/djangolearning
https://redd.it/1g5nb0y
Hey everyone!
I created a Django package that makes it super easy to integrate Google Analytics GA4 into your projects. Here are some features:
Supports Universal Analytics & GA4
IP anonymization and cookie settings
Server-side tracking via middleware
Debug mode for dev environments
Event tracking & custom dimensions
Excludes staff users from tracking
Check it out here: PyPI 👈 github
Contributions are welcome on GitHub! Let me know what you think! 😄
/r/djangolearning
https://redd.it/1g5nb0y
PyPI
google-analytics-django
A Django package to integrate Google Analytics.
Should I extend Django's roles and permissions, or should I create my own roles and permissions layer?
Hello everybody, I want to develop a project management web app as a learning experience, and I have thought about the functionality of the roles and permissions for the users of the web app. Should I extend the Django system and not get too complicated, or should I keep the project roles separate? And about the users? I have also thought about adding specific things like: "You can mark a task as completed", "You can see all the team's tasks" etc. Thank you in advance for taking the time to read and leave your recommendations.
/r/django
https://redd.it/1g69h7g
Hello everybody, I want to develop a project management web app as a learning experience, and I have thought about the functionality of the roles and permissions for the users of the web app. Should I extend the Django system and not get too complicated, or should I keep the project roles separate? And about the users? I have also thought about adding specific things like: "You can mark a task as completed", "You can see all the team's tasks" etc. Thank you in advance for taking the time to read and leave your recommendations.
/r/django
https://redd.it/1g69h7g
Reddit
From the django community on Reddit
Explore this post and more from the django community
Best way to upload file in Django
What's difference using Django UploadFileForm described at https://docs.djangoproject.com/en/5.1/topics/http/file-uploads/
from FileUploadView APIView?
Why should it be serialized? And how is the file is serialized?
Why doesn't it just dump the binary on disk?
It looks like they're making simple thing very hard.
/r/django
https://redd.it/1g6c4a7
What's difference using Django UploadFileForm described at https://docs.djangoproject.com/en/5.1/topics/http/file-uploads/
from FileUploadView APIView?
Why should it be serialized? And how is the file is serialized?
Why doesn't it just dump the binary on disk?
It looks like they're making simple thing very hard.
/r/django
https://redd.it/1g6c4a7
Django Project
File Uploads | Django documentation
The web framework for perfectionists with deadlines.
Django + Celery Tutorial
Hey, all!
I've made a text + video version of Celery tutorial.
Video: https://www.youtube.com/watch?v=RY74ug36KUc
Text: https://appliku.com/celery
This tutorial aims at beginners who struggle with understand what Celery is and how to use it and never set it up before.
I tried to do my best explaining use the concept of it, use cases + step by step instructions on setting Celery app.
The last bit is a real world example of a generating reports using Celery tasks.
Let me know what you think and I hope it helps at least few people to start using this powerful library!
/r/django
https://redd.it/1g6ela0
Hey, all!
I've made a text + video version of Celery tutorial.
Video: https://www.youtube.com/watch?v=RY74ug36KUc
Text: https://appliku.com/celery
This tutorial aims at beginners who struggle with understand what Celery is and how to use it and never set it up before.
I tried to do my best explaining use the concept of it, use cases + step by step instructions on setting Celery app.
The last bit is a real world example of a generating reports using Celery tasks.
Let me know what you think and I hope it helps at least few people to start using this powerful library!
/r/django
https://redd.it/1g6ela0
YouTube
Celery and Django Tutorial: Asynchronous Background Tasks Queue Processing
Learn how to supercharge your Django applications with Celery, the powerful distributed task queue system for Python. This comprehensive tutorial covers:
• What Celery is and how it works
• The concept of distributed task queues
• When and why to use Celery…
• What Celery is and how it works
• The concept of distributed task queues
• When and why to use Celery…
Chat System/Room
Trying to build a chat system where a user can build a chat room and invite some users to chat amongst them.
I have never built a chat system before.Also,this is a backend api project where I'm building api for the frontend.Where and how should I start.
I have built some api and common apps with django and django rest framework.I have the general idea.
/r/django
https://redd.it/1g6fk0a
Trying to build a chat system where a user can build a chat room and invite some users to chat amongst them.
I have never built a chat system before.Also,this is a backend api project where I'm building api for the frontend.Where and how should I start.
I have built some api and common apps with django and django rest framework.I have the general idea.
/r/django
https://redd.it/1g6fk0a
Reddit
From the django community on Reddit
Explore this post and more from the django community
Feature Friday: Model Choices!
Time for another Django Feature Friday! 🚀
Django 5.0 introduced more options for declaring field choices. Now you can use Mapping, a callable, and strings for single-character choices, in addition to the traditional tuples and enumeration.
Previously, Field choices were limited to list of 2-tuples, or an Enumeration types subclass. Now, you can use:
* Strings (for single-character choices) without .choices
* Mapping instead of list of 2-tuples (with hierarchies)
* A callable instead of iterable
Here's an example showcasing these new options:
from django.db import models
Medal = models.TextChoices("Medal", "GOLD SILVER BRONZE")
SPORT_CHOICES = { # Using a mapping instead of a list of 2-tuples.
"Martial Arts": {"judo": "Judo", "karate": "Karate"},
"Racket": {"badminton": "Badminton", "tennis": "Tennis"},
"unknown": "Unknown",
}
def get_scores():
return [(i, str(i)) for i in range(10)]
class Winner(models.Model):
/r/django
https://redd.it/1g6grym
Time for another Django Feature Friday! 🚀
Django 5.0 introduced more options for declaring field choices. Now you can use Mapping, a callable, and strings for single-character choices, in addition to the traditional tuples and enumeration.
Previously, Field choices were limited to list of 2-tuples, or an Enumeration types subclass. Now, you can use:
* Strings (for single-character choices) without .choices
* Mapping instead of list of 2-tuples (with hierarchies)
* A callable instead of iterable
Here's an example showcasing these new options:
from django.db import models
Medal = models.TextChoices("Medal", "GOLD SILVER BRONZE")
SPORT_CHOICES = { # Using a mapping instead of a list of 2-tuples.
"Martial Arts": {"judo": "Judo", "karate": "Karate"},
"Racket": {"badminton": "Badminton", "tennis": "Tennis"},
"unknown": "Unknown",
}
def get_scores():
return [(i, str(i)) for i in range(10)]
class Winner(models.Model):
/r/django
https://redd.it/1g6grym
Reddit
From the django community on Reddit: Feature Friday: Model Choices!
Explore this post and more from the django community
In-depth Django + Celery tutorial
https://www.youtube.com/watch?v=RY74ug36KUc
/r/djangolearning
https://redd.it/1g6eiwg
https://www.youtube.com/watch?v=RY74ug36KUc
/r/djangolearning
https://redd.it/1g6eiwg
YouTube
Celery and Django Tutorial: Asynchronous Background Tasks Queue Processing
Learn how to supercharge your Django applications with Celery, the powerful distributed task queue system for Python. This comprehensive tutorial covers:
• What Celery is and how it works
• The concept of distributed task queues
• When and why to use Celery…
• What Celery is and how it works
• The concept of distributed task queues
• When and why to use Celery…
PyTraceToIX - Debugging Jinja2 template, Flask web apps without breaking the design or code changes
Project on GitHub
## What My Project Does
PyTraceToIX is an expression tracer designed for debugging Jinja2 templates, Flask web apps, lambdas, list comprehensions, method chaining, and expressions in general.
Code editors often cannot set breakpoints within these kinds of expressions, which requires significant code modifications to debug effectively.
For Jinja2 templates, the debug extension can be used, but it typically dumps the entire context, making it difficult to isolate specific issues.
PyTraceToIX solves this by allowing developers to trace and write specific data directly to sys.stdout or a stream without altering the design or making any changes to the web application.
Additionally, PyTraceToIX can capture multiple inputs and their results, displaying them all in a single line, making it easier to view aggregated data and trace the flow of values.
PyTraceToIX offers a straightforward solution to these challenges, simplifying debugging while preserving the integrity of the original codebase.
It was designed to be simple, with easily identifiable functions that can be removed once the bug is found.
PyTraceToIX has 2 major functions:
- c capture the input of an expression input. ex: c(x)
- d display the result of an expression and all the captured inputs. ex: d(c(x) + c(y))
And 2 optional functions:
- init initializes display format, output stream and
/r/Python
https://redd.it/1g6fd28
Project on GitHub
## What My Project Does
PyTraceToIX is an expression tracer designed for debugging Jinja2 templates, Flask web apps, lambdas, list comprehensions, method chaining, and expressions in general.
Code editors often cannot set breakpoints within these kinds of expressions, which requires significant code modifications to debug effectively.
For Jinja2 templates, the debug extension can be used, but it typically dumps the entire context, making it difficult to isolate specific issues.
PyTraceToIX solves this by allowing developers to trace and write specific data directly to sys.stdout or a stream without altering the design or making any changes to the web application.
Additionally, PyTraceToIX can capture multiple inputs and their results, displaying them all in a single line, making it easier to view aggregated data and trace the flow of values.
PyTraceToIX offers a straightforward solution to these challenges, simplifying debugging while preserving the integrity of the original codebase.
It was designed to be simple, with easily identifiable functions that can be removed once the bug is found.
PyTraceToIX has 2 major functions:
- c capture the input of an expression input. ex: c(x)
- d display the result of an expression and all the captured inputs. ex: d(c(x) + c(y))
And 2 optional functions:
- init initializes display format, output stream and
/r/Python
https://redd.it/1g6fd28
GitHub
GitHub - a-bentofreire/pytracetoix: A Python expression tracer designed for debugging Jinja2 templates, Flask web apps, lambdas…
A Python expression tracer designed for debugging Jinja2 templates, Flask web apps, lambdas, list comprehensions, method chaining, and expressions in general. - a-bentofreire/pytracetoix
I built an open-source AI-driven Code Review app for GitHub repos
What My Project Does
Hi Everyone,
I recently built an open-source GitHub app in Django/python that can post a detailed line-by-line code review on any new PR. I'd love help in testing it as I seek feedback on it.
Here is the app: https://gitpack.co/
Here is the source-code: https://github.com/gitpack-ai/gitpack-ai and an example PR review: https://github.com/gitpack-ai/gitpack-ai/pull/9
It's free for open-source repos, but I can enable this for private repos for a month or so, if you DM me. Appreciate your feedback! I hope you all can find value in it.
Target Audience
Anyone who is actively developing on GitHub
/r/Python
https://redd.it/1g6m2mb
What My Project Does
Hi Everyone,
I recently built an open-source GitHub app in Django/python that can post a detailed line-by-line code review on any new PR. I'd love help in testing it as I seek feedback on it.
Here is the app: https://gitpack.co/
Here is the source-code: https://github.com/gitpack-ai/gitpack-ai and an example PR review: https://github.com/gitpack-ai/gitpack-ai/pull/9
It's free for open-source repos, but I can enable this for private repos for a month or so, if you DM me. Appreciate your feedback! I hope you all can find value in it.
Target Audience
Anyone who is actively developing on GitHub
/r/Python
https://redd.it/1g6m2mb
gitpack.co
GitPack | AI-driven Code Reviews
Automate Pull Request Reviews with AI – Get Faster, Smarter Code Reviews on Any GitHub Repo!
I migrated from digital ocean to hetzner - (good experience)
I am building a streaming platform for my wife.
I tried to find the best option over all the cloud providers. At first I decided to use Digital Ocean because of their user friendly docs and UI. Also finding terraform docs was very easy. To be honest setting up the project was very easy so I can say I am satisfied with that.
However the outbound limit of 4TB, was a deal breaker for me. At the beginning I was thinking the limitting the video quality at 720P, however my wife wanted to have 1080P.
I started my search and find out that, hetzner was not only offering the cheap hardware but also the traffic limits were way better. To compare the numbers:
digital ocean: 24$
- 80gb ssd,
- 4gb ram
- 2Vcpu
- 4TB outbound
hetzner: 16€
- 160gb ssd
- 8gb ram
- 4Vcpu
- 20TB outbound.
So I decided to deploy my project on their servers. My concern was not finding good terraform docs for that, but tbh it was very easy and straight forward. In less then 3 hours I was able to run my
/r/django
https://redd.it/1g6kive
I am building a streaming platform for my wife.
I tried to find the best option over all the cloud providers. At first I decided to use Digital Ocean because of their user friendly docs and UI. Also finding terraform docs was very easy. To be honest setting up the project was very easy so I can say I am satisfied with that.
However the outbound limit of 4TB, was a deal breaker for me. At the beginning I was thinking the limitting the video quality at 720P, however my wife wanted to have 1080P.
I started my search and find out that, hetzner was not only offering the cheap hardware but also the traffic limits were way better. To compare the numbers:
digital ocean: 24$
- 80gb ssd,
- 4gb ram
- 2Vcpu
- 4TB outbound
hetzner: 16€
- 160gb ssd
- 8gb ram
- 4Vcpu
- 20TB outbound.
So I decided to deploy my project on their servers. My concern was not finding good terraform docs for that, but tbh it was very easy and straight forward. In less then 3 hours I was able to run my
/r/django
https://redd.it/1g6kive
Reddit
From the django community on Reddit
Explore this post and more from the django community
PyQt best option for commercial use?
I'm looking to possibly develop an app that will run on a Linux Desktop, specifically Ubuntu, and the latest OS X. The UI and performance are very important. Is PyQt my best option?
/r/Python
https://redd.it/1g6brra
I'm looking to possibly develop an app that will run on a Linux Desktop, specifically Ubuntu, and the latest OS X. The UI and performance are very important. Is PyQt my best option?
/r/Python
https://redd.it/1g6brra
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Lost my sqlite database😱. After that I wrote a backup noscript that runs once a day
This is just a warning to all you guys, remember to backup your database cause shit happens. Now I rest easy cause I wrote a backup noscript that runs automatically once a day just to backup my db, I know its going to fill up my space very soon and raise my costs but I do think its worth it, by the way the project I lost the db for was still a new project so there was not a lot of records in there anyway so not all hope is lost
/r/django
https://redd.it/1g6l5dv
This is just a warning to all you guys, remember to backup your database cause shit happens. Now I rest easy cause I wrote a backup noscript that runs automatically once a day just to backup my db, I know its going to fill up my space very soon and raise my costs but I do think its worth it, by the way the project I lost the db for was still a new project so there was not a lot of records in there anyway so not all hope is lost
/r/django
https://redd.it/1g6l5dv
Reddit
From the django community on Reddit
Explore this post and more from the django community
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/1g6wbs0
# 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/1g6wbs0
YouTube
Data Structures and Algorithms in Python - Full Course for Beginners
A beginner-friendly introduction to common data structures (linked lists, stacks, queues, graphs) and algorithms (search, sorting, recursion, dynamic programming) in Python. This course will help you prepare for coding interviews and assessments.
🔗 Course…
🔗 Course…
stick or move to another
So i made an inventory management system in Django for my internship project.
i chose Django for several reasons:
- i wanted to learn python and discover how to do weB apps with it
- i wanted to be unique because all of my colleagues used PHP (Laravel)
- Django has pretty much everything compared to Flask
- ...
Django is the first backend web framework i ever tried.
About the experience..., it was not that good i don't why.
Is it bc the result code IT WAS LITERALLY A MESS
i could not fix bugs or add features without breaking something
and then rollback to the previous version.
and sometimes i wanted to something simple but Django make it hard
like custom forms and how to integrate Django with CSS frameworks make it
an absolute MESS.
what i am missing in my knowledge to have a great experience with Django?
do i miss something in Django or in web/dev itself?
did you have some issues too with Django at your early days learning it?
should i move to something else like Laravel or Spring (ik some Java and PHP)
or just stick with Django?
bc i feel like it is not for me.
project repo
i hope i explained the problem.
thank you in advance.
/r/django
https://redd.it/1g6q4h5
So i made an inventory management system in Django for my internship project.
i chose Django for several reasons:
- i wanted to learn python and discover how to do weB apps with it
- i wanted to be unique because all of my colleagues used PHP (Laravel)
- Django has pretty much everything compared to Flask
- ...
Django is the first backend web framework i ever tried.
About the experience..., it was not that good i don't why.
Is it bc the result code IT WAS LITERALLY A MESS
i could not fix bugs or add features without breaking something
and then rollback to the previous version.
and sometimes i wanted to something simple but Django make it hard
like custom forms and how to integrate Django with CSS frameworks make it
an absolute MESS.
what i am missing in my knowledge to have a great experience with Django?
do i miss something in Django or in web/dev itself?
did you have some issues too with Django at your early days learning it?
should i move to something else like Laravel or Spring (ik some Java and PHP)
or just stick with Django?
bc i feel like it is not for me.
project repo
i hope i explained the problem.
thank you in advance.
/r/django
https://redd.it/1g6q4h5
GitHub
GitHub - karimelkh/inventory_ms
Contribute to karimelkh/inventory_ms development by creating an account on GitHub.
Aid with using anaconda to load fashionmnist
Hello could someone please step out how from the anaconda.navigator to load fashionmnist (which is on a laptop that’s never run it and may be missing things needed)
/r/Python
https://redd.it/1g6wjqj
Hello could someone please step out how from the anaconda.navigator to load fashionmnist (which is on a laptop that’s never run it and may be missing things needed)
/r/Python
https://redd.it/1g6wjqj
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Best resources to learn
Having always use node js for my backends, I’m trying to widen my skills. What are the go to resources to learn Django?
/r/djangolearning
https://redd.it/1g6ull9
Having always use node js for my backends, I’m trying to widen my skills. What are the go to resources to learn Django?
/r/djangolearning
https://redd.it/1g6ull9
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Django SQL Lite DB Built-in Size !?
I want to create a django app but for now i use a noscript on my PC the fetch some data and all the final results are stored into a json that can reach size of 600 to 700 MBs.... Can the DB store this size ? I have a hosting provider where to put the app on and unfortunate, my current plan doesn't have access to bigger DBs, only some that can store up to 350 MBs...
/r/django
https://redd.it/1g7022w
I want to create a django app but for now i use a noscript on my PC the fetch some data and all the final results are stored into a json that can reach size of 600 to 700 MBs.... Can the DB store this size ? I have a hosting provider where to put the app on and unfortunate, my current plan doesn't have access to bigger DBs, only some that can store up to 350 MBs...
/r/django
https://redd.it/1g7022w
Reddit
From the django community on Reddit
Explore this post and more from the django community