Should I choose Next.js or pure HTMX over Django?
I'm working on a startup and planning to build the backend using Python. I'm not a big fan of JS frameworks, so I prefer to let AI handle that while I focus solely on the backend without AI assistance. My current project aims to provide users with low-latency data.
1. Would I be making a mistake by choosing Next.js for the frontend?
2. Is it worthwhile to consider using HTMX with FastAPI or HTMX with Django for this project?
/r/django
https://redd.it/1ee67y3
I'm working on a startup and planning to build the backend using Python. I'm not a big fan of JS frameworks, so I prefer to let AI handle that while I focus solely on the backend without AI assistance. My current project aims to provide users with low-latency data.
1. Would I be making a mistake by choosing Next.js for the frontend?
2. Is it worthwhile to consider using HTMX with FastAPI or HTMX with Django for this project?
/r/django
https://redd.it/1ee67y3
Reddit
From the django community on Reddit
Explore this post and more from the django community
developing a project management interactive dashboard
Greetings,
I'm considering to develop an interactive dashboard that allows the below features
- allows orchestrating tasks between different teams, along with the ability to track the progress
- generate automated reports based on a predefined template
- has an interactive dashboard so I can see the number of tasks per X time and their status
- can be connected to Excel sheet as an input source
would you please advice on what libraries should I use and whether this work is a daunting task and I should go for a vendor-tool? I know the answer would depend on the details of my context, however I'd like to have a general estimation
thanks in advance
/r/Python
https://redd.it/1ee51yz
Greetings,
I'm considering to develop an interactive dashboard that allows the below features
- allows orchestrating tasks between different teams, along with the ability to track the progress
- generate automated reports based on a predefined template
- has an interactive dashboard so I can see the number of tasks per X time and their status
- can be connected to Excel sheet as an input source
would you please advice on what libraries should I use and whether this work is a daunting task and I should go for a vendor-tool? I know the answer would depend on the details of my context, however I'd like to have a general estimation
thanks in advance
/r/Python
https://redd.it/1ee51yz
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
system design mock interviews
Where should i take mock interviews on system design so i can learn more and improve myself
/r/flask
https://redd.it/1ee551q
Where should i take mock interviews on system design so i can learn more and improve myself
/r/flask
https://redd.it/1ee551q
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
How to pass context to render_template?
Hi,
I use Flask with htmx. In case its a normal request, I call `render_template` as usual. But in case the request is coming from htmx, I want to return only a part of the template.
I've created two templates each time I need to return either or.
```jinja2
# login.html
{% extends "base.html" %}
{% block main %}
{% include "login_form.html" %}
{% endblock main %}
```
```jinja2
# login_form.html
<form>
...
</form>
```
In my route I can easily do:
```python
from flask import render_template
if htmx: template = "login_form.html"
else: template = "login.html"
return render_template(template, ...)
```
Now I came across [Jinja2-Fragments](https://github.com/sponsfreixes/jinja2-fragments) which allows to render only individual blocks of a template. That means I wouldn't have to create the wrapper templates, which would be desirable.
Problem is, I now end up with something like:
```python
from flask import render_template
from jinja2_fragments.flask import render_block
if htmx: return render_block("login.html", "main", ...)
else: return render_template("login.html", ...)
```
Okay, cool. But if I pass n variables as context to the template, I have to repeat those in both function calls. Not exactly DRY.
I could create a dict like `vars = {"var1": var1, "var2": var2, ...}` and pass that to both function calls, but then in the template I need to prefix all variables with `vars.var1` which is not so pretty either.
Is
/r/flask
https://redd.it/1eebend
Hi,
I use Flask with htmx. In case its a normal request, I call `render_template` as usual. But in case the request is coming from htmx, I want to return only a part of the template.
I've created two templates each time I need to return either or.
```jinja2
# login.html
{% extends "base.html" %}
{% block main %}
{% include "login_form.html" %}
{% endblock main %}
```
```jinja2
# login_form.html
<form>
...
</form>
```
In my route I can easily do:
```python
from flask import render_template
if htmx: template = "login_form.html"
else: template = "login.html"
return render_template(template, ...)
```
Now I came across [Jinja2-Fragments](https://github.com/sponsfreixes/jinja2-fragments) which allows to render only individual blocks of a template. That means I wouldn't have to create the wrapper templates, which would be desirable.
Problem is, I now end up with something like:
```python
from flask import render_template
from jinja2_fragments.flask import render_block
if htmx: return render_block("login.html", "main", ...)
else: return render_template("login.html", ...)
```
Okay, cool. But if I pass n variables as context to the template, I have to repeat those in both function calls. Not exactly DRY.
I could create a dict like `vars = {"var1": var1, "var2": var2, ...}` and pass that to both function calls, but then in the template I need to prefix all variables with `vars.var1` which is not so pretty either.
Is
/r/flask
https://redd.it/1eebend
GitHub
GitHub - sponsfreixes/jinja2-fragments: Render Jinja2 template block as HTML page fragments on Python web frameworks.
Render Jinja2 template block as HTML page fragments on Python web frameworks. - sponsfreixes/jinja2-fragments
Cli scraper Dedicated to Alibaba v0.2.0
I have already showcased this package project. I just want to inform you all about my package evolution.
What My Project Does ?
Gathering data from Alibaba based on keywords provided by users and save them in database MySQL/sqlite
Targeted Audience
Thoses who want to build an ALIBABA datasets for analysis.
Comparisons
Asynchronous request to handle many page results.
New features:
Set your bright data api key to use async mode.
Export your scraped data to csv file (you must to have an updated sqlite file which will be converted to csv).
Future enhancements:
Add a rag to chat with your database and let him do your SQL query for you .
This will probably the least feature that in planning to add to this project.
Maybe I will make it croos plateform. Cause now it's only works on windows.
Still looking for testers an reviews and suggestions to improve.
Do you think this package have a potential to grow ? Is it useful ? If not how to make more interesting ?
Here is the repo : https://github.com/poneoneo/Alibaba-CLI-Scrapper
Also excuse me for orthography errors on 'scraper'
I'm find a way to rename my package but its seems to be hard and risky and I dont want to
/r/Python
https://redd.it/1ee79hd
I have already showcased this package project. I just want to inform you all about my package evolution.
What My Project Does ?
Gathering data from Alibaba based on keywords provided by users and save them in database MySQL/sqlite
Targeted Audience
Thoses who want to build an ALIBABA datasets for analysis.
Comparisons
Asynchronous request to handle many page results.
New features:
Set your bright data api key to use async mode.
Export your scraped data to csv file (you must to have an updated sqlite file which will be converted to csv).
Future enhancements:
Add a rag to chat with your database and let him do your SQL query for you .
This will probably the least feature that in planning to add to this project.
Maybe I will make it croos plateform. Cause now it's only works on windows.
Still looking for testers an reviews and suggestions to improve.
Do you think this package have a potential to grow ? Is it useful ? If not how to make more interesting ?
Here is the repo : https://github.com/poneoneo/Alibaba-CLI-Scrapper
Also excuse me for orthography errors on 'scraper'
I'm find a way to rename my package but its seems to be hard and risky and I dont want to
/r/Python
https://redd.it/1ee79hd
GitHub
GitHub - poneoneo/Alibaba-CLI-Scraper: Create your own Alibaba dataset and interact with it in plain English.
Create your own Alibaba dataset and interact with it in plain English. - poneoneo/Alibaba-CLI-Scraper
Django seems like a full-stack framework as opposed to a back-end framework, Is it right for me if I'm looking for a back-end framework?
Title basically sums it up. I wanna get into Django but the tutorials I've seen so far make it seem like it's more of a full-stack framework, and this is making it really difficult for me to know what I'm learning?
I plan on using it with frameworks like React, HTML, CSS, Next.js and more.
This might be a dumb question but I really need to know. Thanks!
/r/django
https://redd.it/1eeai8t
Title basically sums it up. I wanna get into Django but the tutorials I've seen so far make it seem like it's more of a full-stack framework, and this is making it really difficult for me to know what I'm learning?
I plan on using it with frameworks like React, HTML, CSS, Next.js and more.
This might be a dumb question but I really need to know. Thanks!
/r/django
https://redd.it/1eeai8t
Reddit
From the django community on Reddit
Explore this post and more from the django community
Cool services you've made with FastAPI
Hey Everyone, I was just wondering what kind of cool projects people have made using FastAPI? What did you like about the framework and what did you dislike? Is FastAPI used a lot with ML models or computer vision services. Would love to hear your experiences and projects!
/r/Python
https://redd.it/1eeeoti
Hey Everyone, I was just wondering what kind of cool projects people have made using FastAPI? What did you like about the framework and what did you dislike? Is FastAPI used a lot with ML models or computer vision services. Would love to hear your experiences and projects!
/r/Python
https://redd.it/1eeeoti
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
I built an e-commerce site
I built an e-commerce site. If you guys have some spare time, can you guys test out my site and give me some feedback, please? Any feedback will be greatly appreciated. Thank you very much. Here is the site at Pythonanywhere Here is the username and password: new_user1, testuser123
/r/djangolearning
https://redd.it/1ee9cwd
I built an e-commerce site. If you guys have some spare time, can you guys test out my site and give me some feedback, please? Any feedback will be greatly appreciated. Thank you very much. Here is the site at Pythonanywhere Here is the username and password: new_user1, testuser123
/r/djangolearning
https://redd.it/1ee9cwd
Pythonanywhere
Home
shop, online market, gadgets, PC, laptop
Giving the option to the user of allowing concurrent login
Hi there,
i am new to django. I implemented the disabling of concurrent login on the same account using different devices by the use of sessions.
So i thought of why not letting the user itself decide if he wants to allow concurrent login or not.
I tried searching for solutions to this but my search was fruitless.
Any help is appreciated !
/r/djangolearning
https://redd.it/1edpig2
Hi there,
i am new to django. I implemented the disabling of concurrent login on the same account using different devices by the use of sessions.
So i thought of why not letting the user itself decide if he wants to allow concurrent login or not.
I tried searching for solutions to this but my search was fruitless.
Any help is appreciated !
/r/djangolearning
https://redd.it/1edpig2
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Running Background Tasks in Production (Azure Web App)
have a Django backend project in which i use django-background-tasks to send scheduled emails in the background , in development environment i need a second terminal running the command :
now for the production environment i hosted the backend on azure web app and tried the approach of
supervisor (http://supervisord.org/configuration.html) creating a conf file that gets executed on the server but for now i have to manually connect to the server via ssh and run this file the whole point of using the module is to automate this part yet it doesn't seem to work
https://preview.redd.it/sb0urf0232fd1.png?width=833&format=png&auto=webp&s=076055d0f2ad8ea6f9786604aa31d031ef2f7528
also tried to add to the deployment workflow this part :
- name: Set up Supervisor
run: |
# Install Supervisor
pip install supervisor
# Create logs directory if it doesn't exist
mkdir -p logs
chmod 666 logs
# Start Supervisor
/r/djangolearning
https://redd.it/1edfdu1
have a Django backend project in which i use django-background-tasks to send scheduled emails in the background , in development environment i need a second terminal running the command :
python manage.py process_tasksnow for the production environment i hosted the backend on azure web app and tried the approach of
supervisor (http://supervisord.org/configuration.html) creating a conf file that gets executed on the server but for now i have to manually connect to the server via ssh and run this file the whole point of using the module is to automate this part yet it doesn't seem to work
https://preview.redd.it/sb0urf0232fd1.png?width=833&format=png&auto=webp&s=076055d0f2ad8ea6f9786604aa31d031ef2f7528
also tried to add to the deployment workflow this part :
- name: Set up Supervisor
run: |
# Install Supervisor
pip install supervisor
# Create logs directory if it doesn't exist
mkdir -p logs
chmod 666 logs
# Start Supervisor
/r/djangolearning
https://redd.it/1edfdu1
This media is not supported in your browser
VIEW IN TELEGRAM
My first flask app, got popular on Instagram (2m views, 50k+ users) what do you all think?
https://redd.it/1eelt6t
@pythondaily
https://redd.it/1eelt6t
@pythondaily
Starting a new django job tomorrow
what should I know? what its a must to study?
context: I have only basic notions of this framework, like already build a simple CRUD and thats all. even tho the company selected me because because, I dont really know why but they liked me, but its the only tech of the company Im not very familiar. Im very nervous
/r/django
https://redd.it/1eepb7o
what should I know? what its a must to study?
context: I have only basic notions of this framework, like already build a simple CRUD and thats all. even tho the company selected me because because, I dont really know why but they liked me, but its the only tech of the company Im not very familiar. Im very nervous
/r/django
https://redd.it/1eepb7o
Reddit
From the django community on Reddit
Explore this post and more from the django community
Monday Daily Thread: Project ideas!
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1eellgu
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1eellgu
YouTube
Build & Integrate your own custom chatbot to a website (Python & JavaScript)
In this fun project you learn how to build a custom chatbot in Python and then integrate this to a website using Flask and JavaScript.
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
What benefit do PostgreSQL connection pools offer over CONNMAXAGE ?
Django 5.1 has psycopg connection pool support: https://docs.djangoproject.com/en/5.1/releases/5.1/#postgresql-connection-pools
How exactly is this different from the existing CONNMAXAGE setting which I assumed was using persistent connection pools already.
/r/django
https://redd.it/1eet0bl
Django 5.1 has psycopg connection pool support: https://docs.djangoproject.com/en/5.1/releases/5.1/#postgresql-connection-pools
How exactly is this different from the existing CONNMAXAGE setting which I assumed was using persistent connection pools already.
/r/django
https://redd.it/1eet0bl
Django Project
Django 5.1 release notes | Django documentation
The web framework for perfectionists with deadlines.
Thoughts on using Figma/Webflow with FastAPI
I dislike working on the front-end. I plan to use Figma exports or Webflow for the front end of my project. Is it sufficient to use FastAPI with Jinja templates for optimal performance?
/r/Python
https://redd.it/1eeqqtq
I dislike working on the front-end. I plan to use Figma exports or Webflow for the front end of my project. Is it sufficient to use FastAPI with Jinja templates for optimal performance?
/r/Python
https://redd.it/1eeqqtq
Reddit
Thoughts on using Figma/Webflow with FastAPI
: r/Python
: r/Python
1.3M subscribers in the Python community. The official Python community for Reddit! Stay up to date with the latest news, packages, and meta…
I created a command line tool using Python and Ollama to automatically create PRs on GitHub
Hey everybody!
# What My Project Does
I created this command line tool called jit that analyses your diffs and commit messages to generate a pull request description (based on your project's PR template if it has one) and then creates a pull request on GitHub (draft by default) using GitHub CLI.
# Target Audience
This tool is meant for developers that use GitHub. Mostly meant for hobby projects, but if you want you can use it on a production project (for work/clients) because:
* it utilizes a local LLM (no sharing your code to 3rd party APIs)
* The pull requests follow the template specified in your repository
* The pull request is marked as draft by default
# Comparison
I have not found any cli tools that do this in this manner. But I think GitHub's Copilot for Pull Requests will certainly generate better descriptions: [https://githubnext.com/projects/copilot-for-pull-requests/](https://githubnext.com/projects/copilot-for-pull-requests/)
# More about me and jit
I am predominantly a full-stack web developer (React, NestJS) for my job, but I love playing around with Python and other things. I have developed this using Python and Ollama with llama3.
I have been using jit almost every day, for about a month now, and it has made such a big difference in my day-to-day as a
/r/Python
https://redd.it/1eehm1a
Hey everybody!
# What My Project Does
I created this command line tool called jit that analyses your diffs and commit messages to generate a pull request description (based on your project's PR template if it has one) and then creates a pull request on GitHub (draft by default) using GitHub CLI.
# Target Audience
This tool is meant for developers that use GitHub. Mostly meant for hobby projects, but if you want you can use it on a production project (for work/clients) because:
* it utilizes a local LLM (no sharing your code to 3rd party APIs)
* The pull requests follow the template specified in your repository
* The pull request is marked as draft by default
# Comparison
I have not found any cli tools that do this in this manner. But I think GitHub's Copilot for Pull Requests will certainly generate better descriptions: [https://githubnext.com/projects/copilot-for-pull-requests/](https://githubnext.com/projects/copilot-for-pull-requests/)
# More about me and jit
I am predominantly a full-stack web developer (React, NestJS) for my job, but I love playing around with Python and other things. I have developed this using Python and Ollama with llama3.
I have been using jit almost every day, for about a month now, and it has made such a big difference in my day-to-day as a
/r/Python
https://redd.it/1eehm1a
GitHub Next
GitHub Next | Copilot for Pull Requests
GitHub Next Project: Pull requests are a central part of the GitHub user experience. Copilot for PRs brings the power of Copilot to the PR experience, to help you write better PR descriptions, and to help your team review and merge PRs faster.
D Simple Questions Thread
Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the title.
Thanks to everyone for answering questions in the previous thread!
/r/MachineLearning
https://redd.it/1ee9dra
Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the title.
Thanks to everyone for answering questions in the previous thread!
/r/MachineLearning
https://redd.it/1ee9dra
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
How long would it take to switch from SQLite to SQL?
Going from non prod to prod soon.
Also, anyone know how long it takes to implement google login? So users can click sign in with google etc
Thanks!!
(I am on azure)
/r/django
https://redd.it/1eexzx3
Going from non prod to prod soon.
Also, anyone know how long it takes to implement google login? So users can click sign in with google etc
Thanks!!
(I am on azure)
/r/django
https://redd.it/1eexzx3
Reddit
From the django community on Reddit
Explore this post and more from the django community
Do you feel like Python's type hinting got "stable"?
Basically the title.
I was reading through [https://docs.python.org/3.13/library/typing.html](https://docs.python.org/3.13/library/typing.html) and noticed that quite a lot happened over the last few years. Doing a text search for `deprecated since version x` with `x` being one of `3.9` to `3.13` I found these according numbers of occurrences:
* `3.9` -> 37
* `3.10` -> 0
* `3.11` -> 1
* `3.12` -> 3
* `3.13` -> 5
Which makes me question how "stable" Python type hinting has become these days. Do you think that there are still rough edges that need major overhauls or is Python 3.13 actually mostly where we need it to be in order to productively use static typing?
/r/Python
https://redd.it/1ef1ym0
Basically the title.
I was reading through [https://docs.python.org/3.13/library/typing.html](https://docs.python.org/3.13/library/typing.html) and noticed that quite a lot happened over the last few years. Doing a text search for `deprecated since version x` with `x` being one of `3.9` to `3.13` I found these according numbers of occurrences:
* `3.9` -> 37
* `3.10` -> 0
* `3.11` -> 1
* `3.12` -> 3
* `3.13` -> 5
Which makes me question how "stable" Python type hinting has become these days. Do you think that there are still rough edges that need major overhauls or is Python 3.13 actually mostly where we need it to be in order to productively use static typing?
/r/Python
https://redd.it/1ef1ym0
Python documentation
typing — Support for type hints
Source code: Lib/typing.py This module provides runtime support for type hints. Consider the function below: The function surface_area_of_cube takes an argument expected to be an instance of float,...