How can I integrate a existing django project into a django ui kit?
Hey guys....i have joined a startup..and they have 2 things
1. A django project with some models and html templates where i can input data ...
2. A django ui kit...
Now they want me to integrate the main project into the ui kit...
How can i do this?
Is there any way to do this via API?
If so, then how to do this?
/r/djangolearning
https://redd.it/1dmhdrs
Hey guys....i have joined a startup..and they have 2 things
1. A django project with some models and html templates where i can input data ...
2. A django ui kit...
Now they want me to integrate the main project into the ui kit...
How can i do this?
Is there any way to do this via API?
If so, then how to do this?
/r/djangolearning
https://redd.it/1dmhdrs
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Understanding someone else's code
I'm interning right now and have been handed over an unfinished django project by the company. how do i begin to try understanding it ? is there a method that experienced devs use ? the proj does have a postman collection but no other documentation as such. My question might be a little ignorant but i just need to be pointed in the right direction.
(the project isn't live right now, they've just given me push access on github)
/r/django
https://redd.it/1dmhoqh
I'm interning right now and have been handed over an unfinished django project by the company. how do i begin to try understanding it ? is there a method that experienced devs use ? the proj does have a postman collection but no other documentation as such. My question might be a little ignorant but i just need to be pointed in the right direction.
(the project isn't live right now, they've just given me push access on github)
/r/django
https://redd.it/1dmhoqh
Reddit
From the django community on Reddit
Explore this post and more from the django community
Python(Django) vs JS(MERN) vs Java
I'm currently a 2nd-year college student with a 2-month vacation right now. I'm planning to dive into web development during this break and throughout my 2nd year. I’d appreciate some advice on my roadmap and whether it’s optimized for my goals.
Here's my current plan:
**2nd Year:**
- **Summer (2 Months)**:
- **Backend**: Learn Django (I already know Python).
- **Frontend**: Learn React.
- **Academic Year**:
- Continue with Django and React.
- Learn FastAPI for building high-performance APIs.
- Focus on Java for DSA (since my college curriculum includes Java).
**3rd Year:**
- **College Curriculum**: Focus on Python for AI/ML projects with Django(heard django is good for this)
- **Self-study**: Switch to the MERN stack (MongoDB, Express.js, React, Node.js) ( Bcoz it is more performant)
**4th Year:**
- **Web Development**: Gain proficiency in both Python (Django, FastAPI) and the MERN stack.
(MAYBE TRY) - **App Development**: Learn React Native or Flutter.
My questions are:
1. Is this roadmap feasible and efficient for becoming proficient in development?
2. Should I prioritize Django and FastAPI over the MERN stack, or vice versa?
3. Given that big companies often use Java and startups lean towards the MERN stack, how should I balance my learning focus?
4. Any other tips or suggestions to
/r/django
https://redd.it/1dmogee
I'm currently a 2nd-year college student with a 2-month vacation right now. I'm planning to dive into web development during this break and throughout my 2nd year. I’d appreciate some advice on my roadmap and whether it’s optimized for my goals.
Here's my current plan:
**2nd Year:**
- **Summer (2 Months)**:
- **Backend**: Learn Django (I already know Python).
- **Frontend**: Learn React.
- **Academic Year**:
- Continue with Django and React.
- Learn FastAPI for building high-performance APIs.
- Focus on Java for DSA (since my college curriculum includes Java).
**3rd Year:**
- **College Curriculum**: Focus on Python for AI/ML projects with Django(heard django is good for this)
- **Self-study**: Switch to the MERN stack (MongoDB, Express.js, React, Node.js) ( Bcoz it is more performant)
**4th Year:**
- **Web Development**: Gain proficiency in both Python (Django, FastAPI) and the MERN stack.
(MAYBE TRY) - **App Development**: Learn React Native or Flutter.
My questions are:
1. Is this roadmap feasible and efficient for becoming proficient in development?
2. Should I prioritize Django and FastAPI over the MERN stack, or vice versa?
3. Given that big companies often use Java and startups lean towards the MERN stack, how should I balance my learning focus?
4. Any other tips or suggestions to
/r/django
https://redd.it/1dmogee
Reddit
From the django community on Reddit
Explore this post and more from the django community
I want to build my first SaaS.
Hey all!
So, I've been a django developer for about 2 years and now I want to build my first SaaS, any advice on how to get started? I don't have any experience on how to put a website to production and I think that's something I'll need to learn along the way.
Stuff like load balancing also scare me cause I'm a self-taught programmer and I'm always afraid of forgetting something or writing shitty code. Besides, I don't have any front-end development knowledge so I think I'm gonna be using django's templates to build the front-end. Is this a stupid idea?
Any help is extremely appreciated :D
/r/django
https://redd.it/1dmwhha
Hey all!
So, I've been a django developer for about 2 years and now I want to build my first SaaS, any advice on how to get started? I don't have any experience on how to put a website to production and I think that's something I'll need to learn along the way.
Stuff like load balancing also scare me cause I'm a self-taught programmer and I'm always afraid of forgetting something or writing shitty code. Besides, I don't have any front-end development knowledge so I think I'm gonna be using django's templates to build the front-end. Is this a stupid idea?
Any help is extremely appreciated :D
/r/django
https://redd.it/1dmwhha
Reddit
From the django community on Reddit
Explore this post and more from the django community
Django and Reactjs
Hi everyone,
Just an update that I've been working on an exciting side project that combines Django and ReactJS!
🌟 Project Highlights:Seamless Integration: Leveraging Django's robust backend capabilities with React's dynamic frontend features.
Responsive Design: Ensuring a smooth and intuitive user experience across all devices.
Scalable Architecture: Building a solid foundation that can easily grow with additional features.
💡 Learning & Growth: This project has been an good learning journey, allowing me to deepen my understanding of full-stack development and modern web technologies. It has also given me hands-on experience with RESTful APIs, state management, and component-based design.
📈 Future Plans: I'm looking forward to adding more features, optimizing performance, and maybe soon will drop a demo.
https://preview.redd.it/c9o1qjj9oc8d1.png?width=1366&format=png&auto=webp&s=62d0fbf5f5edf7d85e9deb10c0cfc0a0cd5315bc
https://preview.redd.it/pl8h5xj9oc8d1.png?width=1366&format=png&auto=webp&s=63b904b10480a3d2233321aa7a22063e98c77f5a
https://preview.redd.it/7urmdyj9oc8d1.png?width=1366&format=png&auto=webp&s=4d861c06f249e72d7b416555f798f972884154ef
https://preview.redd.it/8268lrm9oc8d1.png?width=1366&format=png&auto=webp&s=13e27b4beb7e28b0bb3f3739dc11c42922ecc104
/r/django
https://redd.it/1dmqcdq
Hi everyone,
Just an update that I've been working on an exciting side project that combines Django and ReactJS!
🌟 Project Highlights:Seamless Integration: Leveraging Django's robust backend capabilities with React's dynamic frontend features.
Responsive Design: Ensuring a smooth and intuitive user experience across all devices.
Scalable Architecture: Building a solid foundation that can easily grow with additional features.
💡 Learning & Growth: This project has been an good learning journey, allowing me to deepen my understanding of full-stack development and modern web technologies. It has also given me hands-on experience with RESTful APIs, state management, and component-based design.
📈 Future Plans: I'm looking forward to adding more features, optimizing performance, and maybe soon will drop a demo.
https://preview.redd.it/c9o1qjj9oc8d1.png?width=1366&format=png&auto=webp&s=62d0fbf5f5edf7d85e9deb10c0cfc0a0cd5315bc
https://preview.redd.it/pl8h5xj9oc8d1.png?width=1366&format=png&auto=webp&s=63b904b10480a3d2233321aa7a22063e98c77f5a
https://preview.redd.it/7urmdyj9oc8d1.png?width=1366&format=png&auto=webp&s=4d861c06f249e72d7b416555f798f972884154ef
https://preview.redd.it/8268lrm9oc8d1.png?width=1366&format=png&auto=webp&s=13e27b4beb7e28b0bb3f3739dc11c42922ecc104
/r/django
https://redd.it/1dmqcdq
Python Polars 1.0.0-rc.1 released
After the 1.0.0-beta.1 last week the first (and possibly only) release candidate of Python Polars was tagged.
1.0.0-rc.1 release page: [https://github.com/pola-rs/polars/releases/tag/py-1.0.0-rc.1](https://github.com/pola-rs/polars/releases/tag/py-1.0.0-rc.1)
Migration guide: https://docs.pola.rs/releases/upgrade/1/
About Polars
Polars is a blazingly fast DataFrame library for manipulating structured data. The core is written in Rust, and available for Python, R and NodeJS.
Key features
Fast: Written from scratch in Rust, designed close to the machine and without external dependencies.
I/O: First class support for all common data storage layers: local, cloud storage & databases.
Intuitive API: Write your queries the way they were intended. Polars, internally, will determine the most efficient way to execute using its query optimizer.
Out of Core: The streaming API allows you to process your results without requiring all your data to be in memory at the same time
Parallel: Utilises the power of your machine by dividing the workload among the available CPU cores without any additional configuration.
Vectorized Query Engine: Using Apache Arrow, a columnar data format, to process your queries in a vectorized manner and SIMD to optimize CPU usage.
/r/Python
https://redd.it/1dmmqmn
After the 1.0.0-beta.1 last week the first (and possibly only) release candidate of Python Polars was tagged.
1.0.0-rc.1 release page: [https://github.com/pola-rs/polars/releases/tag/py-1.0.0-rc.1](https://github.com/pola-rs/polars/releases/tag/py-1.0.0-rc.1)
Migration guide: https://docs.pola.rs/releases/upgrade/1/
About Polars
Polars is a blazingly fast DataFrame library for manipulating structured data. The core is written in Rust, and available for Python, R and NodeJS.
Key features
Fast: Written from scratch in Rust, designed close to the machine and without external dependencies.
I/O: First class support for all common data storage layers: local, cloud storage & databases.
Intuitive API: Write your queries the way they were intended. Polars, internally, will determine the most efficient way to execute using its query optimizer.
Out of Core: The streaming API allows you to process your results without requiring all your data to be in memory at the same time
Parallel: Utilises the power of your machine by dividing the workload among the available CPU cores without any additional configuration.
Vectorized Query Engine: Using Apache Arrow, a columnar data format, to process your queries in a vectorized manner and SIMD to optimize CPU usage.
/r/Python
https://redd.it/1dmmqmn
GitHub
Release Python Polars 1.0.0-beta.1 · pola-rs/polars
💥 Breaking changes
Change data orientation inference logic for DataFrame construction and warn when row orientation is inferred (#16976)
Properly apply strict parameter in Series constructor (#169...
Change data orientation inference logic for DataFrame construction and warn when row orientation is inferred (#16976)
Properly apply strict parameter in Series constructor (#169...
Stamp: a mini-language for templates
https://scroll.pub/blog/stamp.html
/r/django
https://redd.it/1dmvlv8
https://scroll.pub/blog/stamp.html
/r/django
https://redd.it/1dmvlv8
scroll.pub
Stamp: a microlang for project templates
Official blog for Scroll
Django + Pgvector + LLMs = Semantic Search and AI Agent Powered Document Analytics
Hi, folks, sharing my latest open source Django project to experiment with Django-powered document analytics tools. I've worked on OpenContracts for a number of years now. While it started out as a tool to label and annotate documents, thanks to the recent advances in LLMs and vector databases, I've released a new version with a bunch of cool features to use LLMs, vector search and AI Agents. It keeps amazing me how Django keeps getting more and more capable with age!
I had to share!
Some Screen Captures:
You can upload documents and they're automatically parsed by layout and their vector embeddings are stored in Django via pgvector
Data extracted from documents is traceable back to the source in the document
Key Features:
1. Manage Documents - Manage document collections
2. Layout Parser - Automatically extracts layout features from PDFs
3. Automatic Vector Embeddings - generated for uploaded PDFs and extracted layout blocks
4. Pluggable microservice analyzer architecture - to let you analyze documents and automatically annotate them
5. Human Annotation Interface - to manually annotated documents, including multi-page annotations.
6. LlamaIndex Integration - Use our vector stores (powered by pgvector) and any manual or automatically annotated features to let an LLM intelligently answer questions.
7. Data Extract - ask multiple questions across hundreds of documents using complex
/r/django
https://redd.it/1dn1exe
Hi, folks, sharing my latest open source Django project to experiment with Django-powered document analytics tools. I've worked on OpenContracts for a number of years now. While it started out as a tool to label and annotate documents, thanks to the recent advances in LLMs and vector databases, I've released a new version with a bunch of cool features to use LLMs, vector search and AI Agents. It keeps amazing me how Django keeps getting more and more capable with age!
I had to share!
Some Screen Captures:
You can upload documents and they're automatically parsed by layout and their vector embeddings are stored in Django via pgvector
Data extracted from documents is traceable back to the source in the document
Key Features:
1. Manage Documents - Manage document collections
2. Layout Parser - Automatically extracts layout features from PDFs
3. Automatic Vector Embeddings - generated for uploaded PDFs and extracted layout blocks
4. Pluggable microservice analyzer architecture - to let you analyze documents and automatically annotate them
5. Human Annotation Interface - to manually annotated documents, including multi-page annotations.
6. LlamaIndex Integration - Use our vector stores (powered by pgvector) and any manual or automatically annotated features to let an LLM intelligently answer questions.
7. Data Extract - ask multiple questions across hundreds of documents using complex
/r/django
https://redd.it/1dn1exe
GitHub
GitHub - JSv4/OpenContracts: Enterprise-grade and API-first LLM workspace for unstructured documents, including data extraction…
Enterprise-grade and API-first LLM workspace for unstructured documents, including data extraction, redaction, rights management, prompt playground, and more! - JSv4/OpenContracts
[R] [CVPR 2024] AV-RIR: Audio-Visual Room Impulse Response Estimation
https://www.youtube.com/watch?v=tTsKhviukAE
/r/MachineLearning
https://redd.it/1dmzdeb
https://www.youtube.com/watch?v=tTsKhviukAE
/r/MachineLearning
https://redd.it/1dmzdeb
YouTube
[CVPR 2024] AV-RIR: Audio-Visual Room Impulse Response Estimation (Supplementary Video)
Accurate estimation of Room Impulse Response (RIR), which captures an environment's acoustic properties, is important for speech processing and AR/VR applications. We propose AV-RIR, a novel multi-modal multi-task learning approach to accurately estimate…
Flask Mega Tutorial Migration problems
I'm following the 2023 Flask Mega Tutorial and I can't get the migration portion to work for me.
I don't want to use sqlite, so I have an AWS RDS for MySQL instance running and have confirmed that I can connect to it. I can make changes and run queries via MySQL Workbench. But no matter what I do I can't get flask migrate to see the models I'm defining and make the changes. The flask db init command works fine.
models.py
\_\_init\_\_.py
Anyone have any insight? I'm pulling my hair out trying to solve this.
/r/flask
https://redd.it/1dmzswg
I'm following the 2023 Flask Mega Tutorial and I can't get the migration portion to work for me.
I don't want to use sqlite, so I have an AWS RDS for MySQL instance running and have confirmed that I can connect to it. I can make changes and run queries via MySQL Workbench. But no matter what I do I can't get flask migrate to see the models I'm defining and make the changes. The flask db init command works fine.
models.py
\_\_init\_\_.py
Anyone have any insight? I'm pulling my hair out trying to solve this.
/r/flask
https://redd.it/1dmzswg
Pastebin
models.py - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Admin panel no longer synced with friend
I’m working on a project with a friend, and our admin panel would usually be synced. For example, if they made a superuser, then it would show up under Users on my admin panel and vice versa. However, I was working on the project today and realized our databases weren’t synced anymore, and it was causing issues in the project. Any general idea why this could happen and how to fix it?
/r/django
https://redd.it/1dn5gob
I’m working on a project with a friend, and our admin panel would usually be synced. For example, if they made a superuser, then it would show up under Users on my admin panel and vice versa. However, I was working on the project today and realized our databases weren’t synced anymore, and it was causing issues in the project. Any general idea why this could happen and how to fix it?
/r/django
https://redd.it/1dn5gob
Reddit
From the django community on Reddit
Explore this post and more from the django community
Need suggestions?
I am trying to build a forum for share marker investors in India as a part of my pet project.
Can you suggest the UI/UX that you find useful in this website.
I am very bad at front end and looking forward to learning React with tailwindcss to implement front end in near future.
One improvement i can think of is a typeahead in the search bar where users can see the possible matches as they type.
You can see the website here
https://rallyproduction.azurewebsites.net/
/r/django
https://redd.it/1dn8b97
I am trying to build a forum for share marker investors in India as a part of my pet project.
Can you suggest the UI/UX that you find useful in this website.
I am very bad at front end and looking forward to learning React with tailwindcss to implement front end in near future.
One improvement i can think of is a typeahead in the search bar where users can see the possible matches as they type.
You can see the website here
https://rallyproduction.azurewebsites.net/
/r/django
https://redd.it/1dn8b97
Dynamically invalidate cache after database update
I've developed a Flask app where the frontend content is currently embedded directly in the HTML files. For SEO and easier content management, I want to move this content to a database so that I can update it via an Admin Panel.
Previously, I used Flask-Caching, but I encountered an issue where I had to set a timeout to see content updates. I want to improve this by automatically invalidating the cache when content changes. Here's my approach:
My question is: Is this a good approach to ensure that the cached content is updated dynamically, and how can I improve it? Are there better ways to handle caching with dynamic content in Flask?
/r/flask
https://redd.it/1dmq9ol
I've developed a Flask app where the frontend content is currently embedded directly in the HTML files. For SEO and easier content management, I want to move this content to a database so that I can update it via an Admin Panel.
Previously, I used Flask-Caching, but I encountered an issue where I had to set a timeout to see content updates. I want to improve this by automatically invalidating the cache when content changes. Here's my approach:
myapp/models.py
# myapp/models.py
from sqlalchemy import event
from myapp.extensions import db, cache
class PageSection(db.Model):
__tablename__ = 'page_section'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String)
content_html = db.Column(db.String)
created_at = db.Column(db.DateTime)
updated_at = db.Column(db.DateTime)
def invalidate_cache(mapper, connection, target):
cache.delete('page_section_cache_key')
event.listen(PageSection, 'after_update', invalidate_cache)
event.listen(PageSection, 'after_insert', invalidate_cache)
event.listen(PageSection, 'after_delete', invalidate_cache)
myapp/routes/pages.pyfrom myapp.models import invalidate_cache, PageSection
@app.route('/page/<section_id>')
@cache.cached(timeout=60*60, key_prefix=lambda: f'page_view_{section_id}')
def page_view(section_id):
page_section = PageSection.query.get(section_id)
return render_template('page.html', section=page_section)
My question is: Is this a good approach to ensure that the cached content is updated dynamically, and how can I improve it? Are there better ways to handle caching with dynamic content in Flask?
/r/flask
https://redd.it/1dmq9ol
Reddit
From the flask community on Reddit
Explore this post and more from the flask 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/1dmzzup
# 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/1dmzzup
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…
BM25 for Python: Achieving high performance while simplifying dependencies with BM25S
Hello fellow Python enthusiasts :)
I wanted to share
Blog Post
GitHub Repository
Here is a comparison of BM25S and Elasticsearch in a single-threaded setting (calculated on popular datasets from the BEIR benchmark): https://bm25s.github.io/assets/comparison.png
It was designed to improve upon existing Python implementations, such as the widely used
After installing with
import bm25s
# Create your corpus here
corpus =
"a cat is a feline and likes to purr",
"a dog is the human's best friend and loves to play",
"a bird is a beautiful animal that can fly",
"a fish is a creature that lives in water and swims",
# Create the BM25 model and index the corpus
/r/Python
https://redd.it/1dmwfbf
Hello fellow Python enthusiasts :)
I wanted to share
bm25s, a new lexical search library that fully implemented in Python (via numpy and scipy) and is quite fast.Blog Post
GitHub Repository
Here is a comparison of BM25S and Elasticsearch in a single-threaded setting (calculated on popular datasets from the BEIR benchmark): https://bm25s.github.io/assets/comparison.png
It was designed to improve upon existing Python implementations, such as the widely used
rank-bm25 by being significantly faster; all while being very straightforward to use in Python.After installing with
pip install bm25s, here's the code you'd need to get started:import bm25s
# Create your corpus here
corpus =
"a cat is a feline and likes to purr",
"a dog is the human's best friend and loves to play",
"a bird is a beautiful animal that can fly",
"a fish is a creature that lives in water and swims",
# Create the BM25 model and index the corpus
/r/Python
https://redd.it/1dmwfbf
huggingface.co
BM25 for Python: Achieving high performance while simplifying dependencies with *BM25S*⚡
A Blog post by Xing Han Lù on Hugging Face
Can't get request.POST with HTMX + Checked Attribute
I'm printing the POST result like this:
print(self.request.POST)
In the template, I'm trying to POST the name and value of the input field. It works when the checked attribute is not there but gives me an empty QueryDict <QueryDict: {}> when it's there as per below.
<div class="form-check form-switch">
<input
class="form-check-input"
type="checkbox"
role="switch"
id="survey-{{ survey.pk }}"
name="button"
value="{{ survey.published }}"
hx-post="{% url 'surveys:survey-toggle-status' %}"
hx-trigger="click"
hx-target="#survey-table"
/r/django
https://redd.it/1dn85zr
I'm printing the POST result like this:
print(self.request.POST)
In the template, I'm trying to POST the name and value of the input field. It works when the checked attribute is not there but gives me an empty QueryDict <QueryDict: {}> when it's there as per below.
<div class="form-check form-switch">
<input
class="form-check-input"
type="checkbox"
role="switch"
id="survey-{{ survey.pk }}"
name="button"
value="{{ survey.published }}"
hx-post="{% url 'surveys:survey-toggle-status' %}"
hx-trigger="click"
hx-target="#survey-table"
/r/django
https://redd.it/1dn85zr
Reddit
Can't get request.POST with HTMX + Checked Attribute : r/django
133K subscribers in the django community. News and links for Django developers.
Learn Restful API with Flask
🚀 Mastering RESTful APIs with Python and Flask 🚀
Are you ready to take your skills to the next level? I'm excited to announce the launch of my new Udemy course, designed to help you achieve your goals and excel in your field!🎓 Course Highlights:
* Comprehensive, easy-to-follow lessons
* Practical exercises and real-world examples
* Learn at your own pace, from anywhere
💡 Why Enroll?Whether you're a beginner looking to get started or a seasoned professional seeking to refine your skills, this course has something for everyone. Gain in-depth knowledge, practical skills, and the confidence to succeed.
🔗 Enroll Now: [https://www.udemy.com/course/mastering-restful-apis-a-comprehensive-guide/?referralCode=727DF5F0596A9494D3B5](https://www.udemy.com/course/mastering-restful-apis-a-comprehensive-guide/?referralCode=727DF5F0596A9494D3B5)
Join me on this exciting learning journey and unlock your full potential. See you in the course!
#Udemy #Python #flask #OnlineLearning #SkillDevelopment #Education #CourseLaunch #LearnFromHome
/r/flask
https://redd.it/1dnamd8
🚀 Mastering RESTful APIs with Python and Flask 🚀
Are you ready to take your skills to the next level? I'm excited to announce the launch of my new Udemy course, designed to help you achieve your goals and excel in your field!🎓 Course Highlights:
* Comprehensive, easy-to-follow lessons
* Practical exercises and real-world examples
* Learn at your own pace, from anywhere
💡 Why Enroll?Whether you're a beginner looking to get started or a seasoned professional seeking to refine your skills, this course has something for everyone. Gain in-depth knowledge, practical skills, and the confidence to succeed.
🔗 Enroll Now: [https://www.udemy.com/course/mastering-restful-apis-a-comprehensive-guide/?referralCode=727DF5F0596A9494D3B5](https://www.udemy.com/course/mastering-restful-apis-a-comprehensive-guide/?referralCode=727DF5F0596A9494D3B5)
Join me on this exciting learning journey and unlock your full potential. See you in the course!
#Udemy #Python #flask #OnlineLearning #SkillDevelopment #Education #CourseLaunch #LearnFromHome
/r/flask
https://redd.it/1dnamd8
Udemy
Mastering RESTful APIs with Python and Flask
From Design to Deployment: Unlock the Power of RESTful APIs for Seamless Web Integration
Flask Spotify API Authorization
Hey guys, i'm working on a flask project with spotify api and i'm kind of stuck on the authorization aspect. I already had everything built on flask but decided i wanted a frontend with react so i'm trying to send an access code from flask to react.
This is a nodejs, react tutorial i'm following to set up the authorization - [https://developer.spotify.com/documentation/web-playback-sdk/howtos/web-app-player\](https://developer.spotify.com/documentation/web-playback-sdk/howtos/web-app-player)
Everything works fine until here - Spotify code in nodejs:
request.post(authOptions, function(error, response, body) {
if (!error && response.statusCode === 200) {
var accesstoken = body.accesstoken;
res.redirect('/')
}
});
})
The code is stored locally then requested through an endpoint. I can't do the same with flask as the function will return and all variables and sessions reset. I'm currently sending the access code to frontend through the url. My code -
code = request.args.get('code')
response = util.tokenHeadersData(code)
if response:
return
/r/flask
https://redd.it/1dnkmos
Hey guys, i'm working on a flask project with spotify api and i'm kind of stuck on the authorization aspect. I already had everything built on flask but decided i wanted a frontend with react so i'm trying to send an access code from flask to react.
This is a nodejs, react tutorial i'm following to set up the authorization - [https://developer.spotify.com/documentation/web-playback-sdk/howtos/web-app-player\](https://developer.spotify.com/documentation/web-playback-sdk/howtos/web-app-player)
Everything works fine until here - Spotify code in nodejs:
request.post(authOptions, function(error, response, body) {
if (!error && response.statusCode === 200) {
var accesstoken = body.accesstoken;
res.redirect('/')
}
});
})
The code is stored locally then requested through an endpoint. I can't do the same with flask as the function will return and all variables and sessions reset. I'm currently sending the access code to frontend through the url. My code -
code = request.args.get('code')
response = util.tokenHeadersData(code)
if response:
return
/r/flask
https://redd.it/1dnkmos
Reladiff - High-performance diffing of large datasets across databases
Hi everyone!
I'm here to announce my open-source project Reladiff.
I hope some of you will find it useful!
### What My Project Does
Reladiff is a python library for diffing data across databases (e.g. postgres<->snowflake), and it can handle very large tables with blazing speeds, by running the diff in the database itself.
The API is pretty simple, and highly customizable. Here's the "Hello World":
from reladiff import connecttotable, difftables
table1 = connecttotable("postgresql:///", "tablename", "id")
table2 = connecttotable("mysql:///", "tablename", "id")
sign: Literal['+' | '-']
row: tuple[str, ...]
for sign, row in difftables(table1, table2):
print(sign, row)
### Target Audience
- Data professionals
- DevOps engineers
- System administrators.
Reladiff is safe for use in production.
### Comparison
Reladiff is a fork of a project called "data-diff". I was the main developer for data-diff until last year. It was recently abandoned and archived by its sponsoring company, which is why I'm doing this fork. I kept it mostly as-is, but I fixed the documentation, removed all the tracking code, and the dbt integration.
Other than that, I'm not aware of any relevant open-source alternative. But I'll be
/r/Python
https://redd.it/1dncta4
Hi everyone!
I'm here to announce my open-source project Reladiff.
I hope some of you will find it useful!
### What My Project Does
Reladiff is a python library for diffing data across databases (e.g. postgres<->snowflake), and it can handle very large tables with blazing speeds, by running the diff in the database itself.
The API is pretty simple, and highly customizable. Here's the "Hello World":
from reladiff import connecttotable, difftables
table1 = connecttotable("postgresql:///", "tablename", "id")
table2 = connecttotable("mysql:///", "tablename", "id")
sign: Literal['+' | '-']
row: tuple[str, ...]
for sign, row in difftables(table1, table2):
print(sign, row)
### Target Audience
- Data professionals
- DevOps engineers
- System administrators.
Reladiff is safe for use in production.
### Comparison
Reladiff is a fork of a project called "data-diff". I was the main developer for data-diff until last year. It was recently abandoned and archived by its sponsoring company, which is why I'm doing this fork. I kept it mostly as-is, but I fixed the documentation, removed all the tracking code, and the dbt integration.
Other than that, I'm not aware of any relevant open-source alternative. But I'll be
/r/Python
https://redd.it/1dncta4
GitHub
GitHub - erezsh/reladiff: High-performance diffing of large datasets across databases
High-performance diffing of large datasets across databases - erezsh/reladiff
Naruto Hands Seals Detection (Python project)
I recently used Python to train an AI model to recognize Naruto Hands Seals. The code and model run on your computer and each time you do a hand seal in front of the webcam, it predicts what kind of seal you did and draw the result on the screen. If you want to see a detailed explanation and step-by-step tutorial on how I develop this project, you can watch it here.
/r/Python
https://redd.it/1dng3t3
I recently used Python to train an AI model to recognize Naruto Hands Seals. The code and model run on your computer and each time you do a hand seal in front of the webcam, it predicts what kind of seal you did and draw the result on the screen. If you want to see a detailed explanation and step-by-step tutorial on how I develop this project, you can watch it here.
/r/Python
https://redd.it/1dng3t3
YouTube
I made a Naruto hand sign detection system
Roboflow project: https://universe.roboflow.com/youtube-projects/hands-seals-naruto/model/1
Google Colab notebook: https://colab.research.google.com/drive/1kSGOh1x0k2uy1U1KVQxWlHnMNLhZqy6w?usp=sharing
GitHub repository: https://github.com/lucasfernandoprojects/hand…
Google Colab notebook: https://colab.research.google.com/drive/1kSGOh1x0k2uy1U1KVQxWlHnMNLhZqy6w?usp=sharing
GitHub repository: https://github.com/lucasfernandoprojects/hand…
D which universities and research centers are focusing on adversarial machine learning (especially in Germany) ?
Hey people, I'm curious about where core adversarial learning research is going on. Looking at the publications, I do see several papers from various organizations but rarely do I see an organization advertise that they are focusing on adversarial learning as a field. Especially so for the universities and institutes in Germany.
/r/MachineLearning
https://redd.it/1dnctew
Hey people, I'm curious about where core adversarial learning research is going on. Looking at the publications, I do see several papers from various organizations but rarely do I see an organization advertise that they are focusing on adversarial learning as a field. Especially so for the universities and institutes in Germany.
/r/MachineLearning
https://redd.it/1dnctew
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community