django-ninja vs ninja extra
As the title says I need quick inputs with Django Ninja Extra or other options out of Ninja inspired.
Since we switch between FASTAPI and Django, moving to Ninja over DRF for new projects seemed to be a good move, and so far enjoying it. Discovered Ninja extra, and seems to be cool with Class Views. But is it stable? Need to take a quick call for a project starting in 2-3 days whether we should consider it over Ninja.
Many views hit Redis instead of traditional Django ORM in our applications, for speed and simplicity. Otherwise these are regular CRUD applications. Do advise. Thanks
/r/django
https://redd.it/1c4s832
As the title says I need quick inputs with Django Ninja Extra or other options out of Ninja inspired.
Since we switch between FASTAPI and Django, moving to Ninja over DRF for new projects seemed to be a good move, and so far enjoying it. Discovered Ninja extra, and seems to be cool with Class Views. But is it stable? Need to take a quick call for a project starting in 2-3 days whether we should consider it over Ninja.
Many views hit Redis instead of traditional Django ORM in our applications, for speed and simplicity. Otherwise these are regular CRUD applications. Do advise. Thanks
/r/django
https://redd.it/1c4s832
Reddit
From the django community on Reddit
Explore this post and more from the django community
Deploying a Flask Web App on Second-Level Domain
Hello everyone,
This topic might be discussed, but I haven't found anything specific about it.I recently started programming in Python as a hobby and developed my first web app using Flask.
I want it to be accessible via a second-level domain, and this is where the complications start. During the COVID pandemic, I created a landing page with a portfolio and CV. I used a template, customized it a bit, and uploaded it to WordPress.I bought a domain and hosting on ovhcloud.
Does anyone have experience with this hosting service?
I contacted support and they told me Python is supported, but I can't figure out how to access the server and install the libraries.
The documentation says to access via SSH, but I only have the FTP and SFTP addresses.I'm not sure if this is feasible. Forgive me if I've written nonsense.
TL;DR would like to upload a Flask web app to a second-level domain on ovhcloud hosting. First-level domain with WordPress.
/r/flask
https://redd.it/1c4ui6o
Hello everyone,
This topic might be discussed, but I haven't found anything specific about it.I recently started programming in Python as a hobby and developed my first web app using Flask.
I want it to be accessible via a second-level domain, and this is where the complications start. During the COVID pandemic, I created a landing page with a portfolio and CV. I used a template, customized it a bit, and uploaded it to WordPress.I bought a domain and hosting on ovhcloud.
Does anyone have experience with this hosting service?
I contacted support and they told me Python is supported, but I can't figure out how to access the server and install the libraries.
The documentation says to access via SSH, but I only have the FTP and SFTP addresses.I'm not sure if this is feasible. Forgive me if I've written nonsense.
TL;DR would like to upload a Flask web app to a second-level domain on ovhcloud hosting. First-level domain with WordPress.
/r/flask
https://redd.it/1c4ui6o
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Tuesday Daily Thread: Advanced questions
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1c51rs9
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1c51rs9
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Serve static NextJS files with Flask?
I have been able to do this with a React frontend, but haven't figured it out for NextJS frontend yet and another developer is blocking my testing of this at the moment so forgive me for asking a more "will this likely work" question rather than "here's the error I'm having, how do I fix it" question.
My `next.config.mjs` (the `distDir` property renames the normal `/out` export directory to `/build`):
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
distDir: 'build'
};
export default nextConfig;
I then move the `build` folder that gets created to the root of the application so the folder structure looks something like this:
MyApplication/
├── backend (flask)
└── build (static html/js/css)
In `backend/__init__.py` I have this setup, which is what I have used to deploy ReactJS static files before:
def create_app():
app = Flask(__name__, static_folder="../build", static_url_path="/")
@app.route("/")
/r/flask
https://redd.it/1c4u4om
I have been able to do this with a React frontend, but haven't figured it out for NextJS frontend yet and another developer is blocking my testing of this at the moment so forgive me for asking a more "will this likely work" question rather than "here's the error I'm having, how do I fix it" question.
My `next.config.mjs` (the `distDir` property renames the normal `/out` export directory to `/build`):
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
distDir: 'build'
};
export default nextConfig;
I then move the `build` folder that gets created to the root of the application so the folder structure looks something like this:
MyApplication/
├── backend (flask)
└── build (static html/js/css)
In `backend/__init__.py` I have this setup, which is what I have used to deploy ReactJS static files before:
def create_app():
app = Flask(__name__, static_folder="../build", static_url_path="/")
@app.route("/")
/r/flask
https://redd.it/1c4u4om
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
float('inf') is bad practice
I don't know why float('inf') was chosen as the way the language accesses infinity since this is using a magic string. Why couldn't it just be float.inf? That way magic string is avoided. Feels too basic of a best practice to be simply passed up. Anyone know the reason behind this?
/r/Python
https://redd.it/1c4x7b7
I don't know why float('inf') was chosen as the way the language accesses infinity since this is using a magic string. Why couldn't it just be float.inf? That way magic string is avoided. Feels too basic of a best practice to be simply passed up. Anyone know the reason behind this?
/r/Python
https://redd.it/1c4x7b7
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Should I make a React/Django boilerplate?
I’m thinking of making the code I use to get SaaS projects up and running available as a paid boilerplate. This is the stack I use:
- Frontend: React, Tailwind CSS, Netlify
- Backend: Django, Postgres (RDS), Stripe
- DevOps: CircleCI, EC2
- Storage/Caching: S3, CloudFront
The frontend and backend will be on separate subdomains i.e., api.yourdomain.com and app.yourdomain.com and also be in separate repos.
The boilerplate will come with all basic SaaS functionality i.e., user accounts, teams, subscriptions etc. so you’ll only have to code the business logic specific to your app. Would anyone be interested in something like this?
/r/django
https://redd.it/1c5cm0r
I’m thinking of making the code I use to get SaaS projects up and running available as a paid boilerplate. This is the stack I use:
- Frontend: React, Tailwind CSS, Netlify
- Backend: Django, Postgres (RDS), Stripe
- DevOps: CircleCI, EC2
- Storage/Caching: S3, CloudFront
The frontend and backend will be on separate subdomains i.e., api.yourdomain.com and app.yourdomain.com and also be in separate repos.
The boilerplate will come with all basic SaaS functionality i.e., user accounts, teams, subscriptions etc. so you’ll only have to code the business logic specific to your app. Would anyone be interested in something like this?
/r/django
https://redd.it/1c5cm0r
Reddit
From the django community on Reddit
Explore this post and more from the django community
Using Pandas 2 and different datetime erros
Hey Folks,
I am working on a project that uses a bit old pandas version (1.5.3). I am trying to update it and use a more recent version (2.2.2). Its the first time I use pandas 2 btw. I simply ran all my unit tests and got multiple and different errors all concerning some datetime aspects. I tried troubleshooting by searching the errors and look in pandas release note but I find really complicated. It feels like the documentation is really exhaustive but I could really use a note on principal errors one can get switching to pandas 2.
Does anyone have any handy blogpost, article, documentation that specifies this ? My focus is mainly on datetime errors when differences computed or comparaisons
​
Thanks
/r/Python
https://redd.it/1c5b5ky
Hey Folks,
I am working on a project that uses a bit old pandas version (1.5.3). I am trying to update it and use a more recent version (2.2.2). Its the first time I use pandas 2 btw. I simply ran all my unit tests and got multiple and different errors all concerning some datetime aspects. I tried troubleshooting by searching the errors and look in pandas release note but I find really complicated. It feels like the documentation is really exhaustive but I could really use a note on principal errors one can get switching to pandas 2.
Does anyone have any handy blogpost, article, documentation that specifies this ? My focus is mainly on datetime errors when differences computed or comparaisons
​
Thanks
/r/Python
https://redd.it/1c5b5ky
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
i want to save the changes but it creates a new record in django
I am having this problem i don't know why
when i try to save the data it creates a new record instead of updating it
here is my view function for adding and editing
`contact.name`
`contact.email`
`contact.phone`
/r/djangolearning
https://redd.it/1c5f2p6
I am having this problem i don't know why
when i try to save the data it creates a new record instead of updating it
here is my view function for adding and editing
def add_contact(request, contact_id=None): # If contact_id is provided, it means we are editing an existing contact if contact_id: contact = InfoModel.objects.get(rollnumber=contact_id) else: contact = None if request.method == 'POST': # Extract form data number = request.POST.get('number') name = request.POST.get('name') email = request.POST.get('email') phone = request.POST.get('phone')# Handle dynamic fields dynamic_fields = request.POST.getlist('new_field[]') dynamic_data = {f'field_{i}': value for i, value in enumerate(dynamic_fields, start=0)} if contact: contact = InfoModel.objects.get(rollnumber=contact_id) # If editing an existing contact, update the contact object contact.rollnumber = number `contact.name`
= name `contact.email`
= email `contact.phone`
= phone for key, value in dynamic_data.items(): setattr(contact, key, value) contact.save() else: # If adding a new contact, create a new Contact object contact = InfoModel.objects.create(rollnumber=number, name=name, email=email, phone=phone, extra_data=dynamic_data)return redirect('/') # Redirect to the contact list page after adding/editing a contact else: return render(request, 'contact_form.html', {'contact': contact})/r/djangolearning
https://redd.it/1c5f2p6
Post: Crafting A Bash Script with Tmux
Hi there,
I've written a blog post sharing my tmux script for my Django development environment.
Feel free to check it out!
Crafting a bash script with TMUX
​
/r/djangolearning
https://redd.it/1c55e7a
Hi there,
I've written a blog post sharing my tmux script for my Django development environment.
Feel free to check it out!
Crafting a bash script with TMUX
​
/r/djangolearning
https://redd.it/1c55e7a
GeekCoding101 - Make your way to geek
Crafting A Bash Script with Tmux
Big O Cheat Sheet: the time complexities of operations Python's data structures
I made a cheat sheet of all common operations on Python's many data structures. This include both the built-in data structures and all common standard library data structures.
The time complexities of different data structures in Python
If you're unfamiliar with time complexity and Big O notation, be sure to read the first section and the last two sections. I also recommend Ned Batchelder's talk/article that explains this topic more deeply.
/r/Python
https://redd.it/1c5l9px
I made a cheat sheet of all common operations on Python's many data structures. This include both the built-in data structures and all common standard library data structures.
The time complexities of different data structures in Python
If you're unfamiliar with time complexity and Big O notation, be sure to read the first section and the last two sections. I also recommend Ned Batchelder's talk/article that explains this topic more deeply.
/r/Python
https://redd.it/1c5l9px
Pythonmorsels
Python Big O: the time complexities of different data structures in Python
The time complexity of common operations on Python's many data structures.
bridge — automatic infrastructure for Django
https://github.com/Never-Over/bridge
# The Problem
We built
# What My Project Does
When you’re ready to deploy,
/r/Python
https://redd.it/1c5lw83
https://github.com/Never-Over/bridge
# The Problem
We built
bridge to solve the most frustrating part of any new project — infrastructure. Whenever you spin up a new Django project, you usually have to manually configure Postgres, background workers, a task queue, and more. The problem is amplified when you go to deploy your application — hosting providers don’t understand anything about what you’ve configured already, so you have to run through an even more complicated process to set up the same infrastructure in a deployed environment.# What My Project Does
bridge is a pip-installable package that spins up all of the infrastructure you need, and automatically connects it to your Django project. By adding a single line to your Django project's settings.py file, bridge configures everything for you — this means you don’t need to mess with DATABASES, BROKER_URL, or other environment variables to connect to these services.bridge also gives you the access you need to manage these services, including a database and Redis shell, as well as a Flower instance for monitoring background tasks.When you’re ready to deploy,
bridge can handle that as well. By running bridge init render, bridge will write all of the configuration necessary to deploy your application on Render, including/r/Python
https://redd.it/1c5lw83
GitHub
GitHub - gauge-sh/bridge: Automatic infrastructure for Django
Automatic infrastructure for Django. Contribute to gauge-sh/bridge development by creating an account on GitHub.
UXsim 1.1.1 released: Significantly increased performance for the network traffic flow simulator
[Version 1.1.1](https://github.com/toruseo/UXsim/releases/tag/v1.1.1) of UXsim is released, which improves performance significantly.
**Main Changes in 1.1.1**
* Add setting to adjust vehicle logging time interval via World.vehicle\_logging\_timestep\_interval
* By lowering the interval (e.g., World.vehicle\_logging\_timestep\_interval=2), the simulation time can be reduced (\~20% speed up), and we can obtain vehicle trajectory data with slightly less accuracy.
* The logging setting does not affect the internal simulation accuracy. Only the outputted trajectories are affected.
* By setting World.vehicle\_logging\_timestep\_interval=-1, the record\_log is turned off, and the simulation time can be significantly reduced (\~40% speed up).
* This addresses Issue #58
* Correct route choice behavior
* Vehicle.links\_prefer and Vehicle.links\_avoid work correctly now.
**UXsim**
UXsim is a free, open-source macroscopic and mesoscopic network traffic flow simulator written in Python. It simulates the movements of car travelers and traffic congestion in road networks. It is suitable for simulating large-scale (e.g., city-scale) traffic phenomena. UXsim is especially useful for scientific and educational purposes because of its simple, lightweight, and customizable features, but users are free to use UXsim for any purpose.
/r/Python
https://redd.it/1c5q36n
[Version 1.1.1](https://github.com/toruseo/UXsim/releases/tag/v1.1.1) of UXsim is released, which improves performance significantly.
**Main Changes in 1.1.1**
* Add setting to adjust vehicle logging time interval via World.vehicle\_logging\_timestep\_interval
* By lowering the interval (e.g., World.vehicle\_logging\_timestep\_interval=2), the simulation time can be reduced (\~20% speed up), and we can obtain vehicle trajectory data with slightly less accuracy.
* The logging setting does not affect the internal simulation accuracy. Only the outputted trajectories are affected.
* By setting World.vehicle\_logging\_timestep\_interval=-1, the record\_log is turned off, and the simulation time can be significantly reduced (\~40% speed up).
* This addresses Issue #58
* Correct route choice behavior
* Vehicle.links\_prefer and Vehicle.links\_avoid work correctly now.
**UXsim**
UXsim is a free, open-source macroscopic and mesoscopic network traffic flow simulator written in Python. It simulates the movements of car travelers and traffic congestion in road networks. It is suitable for simulating large-scale (e.g., city-scale) traffic phenomena. UXsim is especially useful for scientific and educational purposes because of its simple, lightweight, and customizable features, but users are free to use UXsim for any purpose.
/r/Python
https://redd.it/1c5q36n
GitHub
Release v1.1.1 · toruseo/UXsim
Main Changes
Add setting to adjust vehicle logging time interval via World.vehicle_logging_timestep_interval
By lowering the interval (e.g., World.vehicle_logging_timestep_interval=2), the simula...
Add setting to adjust vehicle logging time interval via World.vehicle_logging_timestep_interval
By lowering the interval (e.g., World.vehicle_logging_timestep_interval=2), the simula...
bridge — automatic infrastructure for Django
https://github.com/Never-Over/bridge
# The Problem
We built
# The Fix
When you’re ready to deploy,
/r/django
https://redd.it/1c5lc9j
https://github.com/Never-Over/bridge
# The Problem
We built
bridge to solve the most frustrating part of any new project — infrastructure. Whenever you spin up a new Django project, you usually have to manually configure Postgres, background workers, a task queue, and more. The problem is amplified when you go to deploy your application — hosting providers don’t understand anything about what you’ve configured already, so you have to run through an even more complicated process to set up the same infrastructure in a deployed environment.# The Fix
bridge is a pip-installable package that spins up all of the infrastructure you need, and automatically connects it to your Django project. By adding a single line to your Django project's settings.py file, bridge configures everything for you — this means you don’t need to mess with DATABASES, BROKER_URL, or other environment variables to connect to these services.bridge also gives you the access you need to manage these services, including a database and Redis shell, as well as a Flower instance for monitoring background tasks.When you’re ready to deploy,
bridge can handle that as well. By running bridge init render, bridge will write all of the configuration necessary to deploy your application on Render, including a button/r/django
https://redd.it/1c5lc9j
GitHub
GitHub - gauge-sh/bridge: Automatic infrastructure for Django
Automatic infrastructure for Django. Contribute to gauge-sh/bridge development by creating an account on GitHub.
Stanford releases their rather comprehensive (500 page) "2004 AI Index Report summarizing the state of AI today.
https://aiindex.stanford.edu/wp-content/uploads/2024/04/HAI_AI-Index-Report-2024.pdf
/r/MachineLearning
https://redd.it/1c59zrq
https://aiindex.stanford.edu/wp-content/uploads/2024/04/HAI_AI-Index-Report-2024.pdf
/r/MachineLearning
https://redd.it/1c59zrq
Reddit
From the MachineLearning community on Reddit: Stanford releases their rather comprehensive (500 page) "2004 AI Index Report summarizing…
Posted by Appropriate_Ant_4629 - 12 votes and 4 comments
How to make one instance of Flask app play a sound through another instance of the same app?
The idea is to have a simple Flask app that has a client page and a server page. I would have the client page open on my phone and the server page open on my computer. I click a button on my phone and a sound is played from my computer.
I know how to play a sound using Javascript, but I'm not sure how to play a sound with Javascript through the Flask app. Any ideas?
/r/flask
https://redd.it/1c5s83e
The idea is to have a simple Flask app that has a client page and a server page. I would have the client page open on my phone and the server page open on my computer. I click a button on my phone and a sound is played from my computer.
I know how to play a sound using Javascript, but I'm not sure how to play a sound with Javascript through the Flask app. Any ideas?
/r/flask
https://redd.it/1c5s83e
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Wednesday Daily Thread: Beginner questions
# Weekly Thread: Beginner Questions 🐍
Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.
## How it Works:
1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.
## Guidelines:
This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).
## Recommended Resources:
If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.
## Example Questions:
1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?
Let's help each other learn Python! 🌟
/r/Python
https://redd.it/1c5vh3q
# Weekly Thread: Beginner Questions 🐍
Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.
## How it Works:
1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.
## Guidelines:
This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).
## Recommended Resources:
If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.
## Example Questions:
1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?
Let's help each other learn Python! 🌟
/r/Python
https://redd.it/1c5vh3q
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
I made a step by step tutorial to show how to set up JWT Authentication and then consume it in a React app
Hello! 👋
A few months ago started making videos documenting my process as I code. I find that doing this helps me develop my skills and it really brings me so much joy to share my guides as every now and then they help someone and when that happens, I feel very very happy! 😀
Anyhow, my latest [video](https://youtu.be/1pIrRTxGnJ4?si=52Nn3h4AjtXYDEn3) is about one hour and twenty-six minutes long. We start the whole process from scratch, beginning with backend development and later moving on to frontend development. In the backend, we create a RESTful API using Django and Django Rest Framework, implementing features such as user registration, login, logout, and user information retrieval with JWT authentication. On the frontend, we build a simple React application with Vite as the build tool, and use Axios for making HTTP requests to the backend API.
**Dependencies:**
**Backend:**
* Django
* Django Rest Framework
* djangorestframework-simplejwt
* django-cors-headers
**Frontend:**
* React.js
* Vite (build tool)
* Axios
Link: [https://youtu.be/1pIrRTxGnJ4?si=52Nn3h4AjtXYDEn3](https://youtu.be/1pIrRTxGnJ4?si=52Nn3h4AjtXYDEn3)
If you watch the video, I would love to hear your thoughts!
Happy coding! 😊
/r/django
https://redd.it/1c5iczb
Hello! 👋
A few months ago started making videos documenting my process as I code. I find that doing this helps me develop my skills and it really brings me so much joy to share my guides as every now and then they help someone and when that happens, I feel very very happy! 😀
Anyhow, my latest [video](https://youtu.be/1pIrRTxGnJ4?si=52Nn3h4AjtXYDEn3) is about one hour and twenty-six minutes long. We start the whole process from scratch, beginning with backend development and later moving on to frontend development. In the backend, we create a RESTful API using Django and Django Rest Framework, implementing features such as user registration, login, logout, and user information retrieval with JWT authentication. On the frontend, we build a simple React application with Vite as the build tool, and use Axios for making HTTP requests to the backend API.
**Dependencies:**
**Backend:**
* Django
* Django Rest Framework
* djangorestframework-simplejwt
* django-cors-headers
**Frontend:**
* React.js
* Vite (build tool)
* Axios
Link: [https://youtu.be/1pIrRTxGnJ4?si=52Nn3h4AjtXYDEn3](https://youtu.be/1pIrRTxGnJ4?si=52Nn3h4AjtXYDEn3)
If you watch the video, I would love to hear your thoughts!
Happy coding! 😊
/r/django
https://redd.it/1c5iczb
YouTube
JWT Authentication System in Django and React.js Full Stack Application | Complete Project Tutorial
In this step by step tutorial, we will create a full-stack web application complete with JWT based authentication. We will use Django + DRF for the backend and React.js for frontend.
We will create Restful APIs to handle user registration, login, logout…
We will create Restful APIs to handle user registration, login, logout…
How to override behaviour of AddIndexConcurrently in Django?
The
However, I have an application that requires something a bit more complex.
I.e., I need to do some checks on the table, and if those checks pass I need to run
Is there a way to do that so that I can just override
/r/django
https://redd.it/1c5xvbf
The
AddIndexConcurrently django class does the following SQL: CREATE INDEX CONCURRENTLY <idx_name>
However, I have an application that requires something a bit more complex.
I.e., I need to do some checks on the table, and if those checks pass I need to run
CREATE INDEX CONCURRENTLY IF NOT EXISTS <idx_name>
Is there a way to do that so that I can just override
AddIndexConcurrently with my own class and do what I need to do there?/r/django
https://redd.it/1c5xvbf
Reddit
From the django community on Reddit
Explore this post and more from the django community
Using external authentication provider
I’m new to Django and authentication, and am trying to determine the correct process for authentication (using Entra ID in my case). When a user tries to access a page, that will call a view, which will then attempt to get an access token. Does the app need to redirect to a Microsoft page, or can this all be achieved in a Django template? Also, once this access token is received where is it stored?
/r/django
https://redd.it/1c5x3qo
I’m new to Django and authentication, and am trying to determine the correct process for authentication (using Entra ID in my case). When a user tries to access a page, that will call a view, which will then attempt to get an access token. Does the app need to redirect to a Microsoft page, or can this all be achieved in a Django template? Also, once this access token is received where is it stored?
/r/django
https://redd.it/1c5x3qo
Reddit
From the django community on Reddit
Explore this post and more from the django community
D Can GNNs be used as model for all types of data?
Since it seems like almost every dataset can be converted to a graph :
1. Tabular - Nodes as rows with no edges between them
2. Text and Audio - Nodes as words with directed edges between adjacent words
3. Time Series - Same as 2
4. Image - Nodes as pixels with undirected edges between adjacent pixels (including diagonal)
Even if GNNs can work on all types of data, I think it may be time and space intensive to covert them into graphs, especially in case of Images.
At the same time, GNNs can make some Tabular data based ML models even more accurate - for e.g. if we have a Tabular dataset on Apartment Pricing, we can add edges between apartments in the same neighborhood so that all their prices are dependent on one another, and this models real-life phenomenon of how apartments in the same neighborhood have codependent pricing based on state of the neighborhood (for e.g. if crimes increase in the neighborhood, all apartments have their prices go down)
/r/MachineLearning
https://redd.it/1c5olyc
Since it seems like almost every dataset can be converted to a graph :
1. Tabular - Nodes as rows with no edges between them
2. Text and Audio - Nodes as words with directed edges between adjacent words
3. Time Series - Same as 2
4. Image - Nodes as pixels with undirected edges between adjacent pixels (including diagonal)
Even if GNNs can work on all types of data, I think it may be time and space intensive to covert them into graphs, especially in case of Images.
At the same time, GNNs can make some Tabular data based ML models even more accurate - for e.g. if we have a Tabular dataset on Apartment Pricing, we can add edges between apartments in the same neighborhood so that all their prices are dependent on one another, and this models real-life phenomenon of how apartments in the same neighborhood have codependent pricing based on state of the neighborhood (for e.g. if crimes increase in the neighborhood, all apartments have their prices go down)
/r/MachineLearning
https://redd.it/1c5olyc
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community