Should I use Flask or React
I currently have access to a server which provides API endpoints which I cannot modify. I want to create a UI for it. Should I go for using Flask to fetch the data from the API using the routes, or just go straight to React?
My biggest problem is that this server only accepts basic authentication. If I use flask, I can have a login page where I ask the user for a username and password, I then query my API endpoint to see if I have the correct combination of username and password, and then save this username and password in a database (in hashed format). If I use React, I need to ask the username and password from the user and I have to either store this locally or in cache. I am assuming that if I do this, it will be stored in plain text.
My questions are:
1. Which implementation would provide more security and convenience? Flask or React?
2. Is it even stupid of me to think of using Flask instead of React?
P.S. First time asking here, and I am at my wits end trying to figure out which of the two I should use.
/r/flask
https://redd.it/1iwtroa
I currently have access to a server which provides API endpoints which I cannot modify. I want to create a UI for it. Should I go for using Flask to fetch the data from the API using the routes, or just go straight to React?
My biggest problem is that this server only accepts basic authentication. If I use flask, I can have a login page where I ask the user for a username and password, I then query my API endpoint to see if I have the correct combination of username and password, and then save this username and password in a database (in hashed format). If I use React, I need to ask the username and password from the user and I have to either store this locally or in cache. I am assuming that if I do this, it will be stored in plain text.
My questions are:
1. Which implementation would provide more security and convenience? Flask or React?
2. Is it even stupid of me to think of using Flask instead of React?
P.S. First time asking here, and I am at my wits end trying to figure out which of the two I should use.
/r/flask
https://redd.it/1iwtroa
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
I finally implemented auto-complete in my terminal based productivity managers code editor, Ticked!
**NEST+**
* Fixed various QOL issues and bugs pertaining to the general code and text editing experience
* Added support for general code completion via Jedi and a custom auto-completion popup
* **Only works in Python currently**
* Local variables, methods, etc. are stored and are automatically appended to the suggestion list.
* Python syntax instantly accessible; common decorators, standard libraries, operators, etc.
[Read the full release notes here](https://github.com/cachebag/Ticked/releases/tag/v0.3.1)
**Install with Homebrew:**
`brew tap cachebag/ticked`
`brew install ticked`
**Install via Pypi:**
`pip install ticked`
I appreciate everyone being so patient and continuing to suggest improvements. School and work has been crazy so far this year, but this project is going to be fleshed out in great detail in the coming months. I'm working on a lot of revamping of the system and continuously improving upon existing features instead of falling to scope creep.
/r/Python
https://redd.it/1iwghxb
**NEST+**
* Fixed various QOL issues and bugs pertaining to the general code and text editing experience
* Added support for general code completion via Jedi and a custom auto-completion popup
* **Only works in Python currently**
* Local variables, methods, etc. are stored and are automatically appended to the suggestion list.
* Python syntax instantly accessible; common decorators, standard libraries, operators, etc.
[Read the full release notes here](https://github.com/cachebag/Ticked/releases/tag/v0.3.1)
**Install with Homebrew:**
`brew tap cachebag/ticked`
`brew install ticked`
**Install via Pypi:**
`pip install ticked`
I appreciate everyone being so patient and continuing to suggest improvements. School and work has been crazy so far this year, but this project is going to be fleshed out in great detail in the coming months. I'm working on a lot of revamping of the system and continuously improving upon existing features instead of falling to scope creep.
/r/Python
https://redd.it/1iwghxb
GitHub
Release 📟 Auto-complete in NEST+! · cachebag/Ticked
Overview | TLDR 📜
Added support for auto-completion, fixed various viewport glitches when using NEST+, general styling fixes and temporarily removed pomodoro timer.
NEST+
Added support for gener...
Added support for auto-completion, fixed various viewport glitches when using NEST+, general styling fixes and temporarily removed pomodoro timer.
NEST+
Added support for gener...
Django Template not working as expected
Hello everyone.
I have the following objects
```
class ManyToManyObjects(models.Model):
id
ObjectA = models.ForeignKey('A')
ObjectB= models.ForeignKey('A') #Different Objects, but for sake of argument lets say they are the same.
Objectmatch = models.CharField}
ObjectScore = models.IntegerField()
Class A(models.Models):
id
data
```
(Redacted some of it for simplicity, but these are the main fields for this interaction.)
And I have the following in my Django Template:
```
{% assign prevmatch '' %}
{% assign lastA ''%}
{% assign lastB ''%}
{% for match in ManyToManyObjects %}
{% if prevcod != match.Objectmatch %}
... //just some sort of header for the table
/r/djangolearning
https://redd.it/1iu2c47
Hello everyone.
I have the following objects
```
class ManyToManyObjects(models.Model):
id
ObjectA = models.ForeignKey('A')
ObjectB= models.ForeignKey('A') #Different Objects, but for sake of argument lets say they are the same.
Objectmatch = models.CharField}
ObjectScore = models.IntegerField()
Class A(models.Models):
id
data
```
(Redacted some of it for simplicity, but these are the main fields for this interaction.)
And I have the following in my Django Template:
```
{% assign prevmatch '' %}
{% assign lastA ''%}
{% assign lastB ''%}
{% for match in ManyToManyObjects %}
{% if prevcod != match.Objectmatch %}
... //just some sort of header for the table
/r/djangolearning
https://redd.it/1iu2c47
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
I built a new playground for Python
https://codiew.io/ide?t=py
Playground (backend) based on Docker images with Google gVisor isolation.
It supports program arguments, pretty output for JSON and I will add a lot feature soon
/r/Python
https://redd.it/1ix0rf0
https://codiew.io/ide?t=py
Playground (backend) based on Docker images with Google gVisor isolation.
It supports program arguments, pretty output for JSON and I will add a lot feature soon
/r/Python
https://redd.it/1ix0rf0
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Open-source reverse proxy to remove sensitive data from OpenAI API calls
Hi, r/Python!
I'd like to share the project I've been working on during the last few weekends.
- Code: https://github.com/edublancas/sanitAI
- Video tutorial: https://youtu.be/bdA7T6Z6YQ4
What My Project Does
SanitAI is a reverse proxy that intercepts calls to OpenAI's API and removes sensitive data. You can add and update rules via an AI agent that asks a few questions, and then defines and tests the rule for you.
For example, you might add a rule to remove credit card numbers and phones. Then, when your users send:
> Hello, my card number is 4111-1111-1111-1111. Call me at (123) 456-7890
The reverse proxy will remove the sensitive data and send this instead:
> Hello, my card number is <VISA-CARD>. Call me at <US-NUMBER>
Target Audience
Engineers using the OpenAI at work that want to prevent sensitive data from leaking.
Comparison
There are several libraries to remove sensitive data from text, however, you still need to do the integration with OpenAI, this project automates adding, and maitaining the rules, and provides a transparent integration with OpenAI. No need to change your existing code.
/r/Python
https://redd.it/1ix4m99
Hi, r/Python!
I'd like to share the project I've been working on during the last few weekends.
- Code: https://github.com/edublancas/sanitAI
- Video tutorial: https://youtu.be/bdA7T6Z6YQ4
What My Project Does
SanitAI is a reverse proxy that intercepts calls to OpenAI's API and removes sensitive data. You can add and update rules via an AI agent that asks a few questions, and then defines and tests the rule for you.
For example, you might add a rule to remove credit card numbers and phones. Then, when your users send:
> Hello, my card number is 4111-1111-1111-1111. Call me at (123) 456-7890
The reverse proxy will remove the sensitive data and send this instead:
> Hello, my card number is <VISA-CARD>. Call me at <US-NUMBER>
Target Audience
Engineers using the OpenAI at work that want to prevent sensitive data from leaking.
Comparison
There are several libraries to remove sensitive data from text, however, you still need to do the integration with OpenAI, this project automates adding, and maitaining the rules, and provides a transparent integration with OpenAI. No need to change your existing code.
/r/Python
https://redd.it/1ix4m99
GitHub
GitHub - edublancas/sanitAI: SanitAI is a drop-in reverse proxy for OpenAI's API to detect and remove PII data.
SanitAI is a drop-in reverse proxy for OpenAI's API to detect and remove PII data. - edublancas/sanitAI
Sparx automation hacks
It’s probably unlikely but i was wondering if anyone here could create a code that would automate your sparx homework and do it for you I’m not very technical in coding and i don’t know how but it would be something like from this yt video https://youtu.be/uu3VSDdSKCg?si=SlejJH9-soJ9Jydn
/r/Python
https://redd.it/1ix77t8
It’s probably unlikely but i was wondering if anyone here could create a code that would automate your sparx homework and do it for you I’m not very technical in coding and i don’t know how but it would be something like from this yt video https://youtu.be/uu3VSDdSKCg?si=SlejJH9-soJ9Jydn
/r/Python
https://redd.it/1ix77t8
YouTube
Sparx maths homework cheats
#sparx #sparxmaths #cheat #cheating #hack #hacks #hacker #homework #automation #bot #maths #mathshomework
Sparx maths bot, fully works, Microsoft and google login coming soon
discord being added to description in around 2 days you can download from there…
Sparx maths bot, fully works, Microsoft and google login coming soon
discord being added to description in around 2 days you can download from there…
Need help with flask
I am getting started with flask. Can anyone explain how it works , how projects are structured , etc.
/r/flask
https://redd.it/1iwykut
I am getting started with flask. Can anyone explain how it works , how projects are structured , etc.
/r/flask
https://redd.it/1iwykut
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Building AI Agents for JupyterLab using Notebook Intelligence
https://blog.jupyter.org/building-ai-agents-for-jupyterlab-using-notebook-intelligence-0515d4c41a61
/r/IPython
https://redd.it/1ix9zef
https://blog.jupyter.org/building-ai-agents-for-jupyterlab-using-notebook-intelligence-0515d4c41a61
/r/IPython
https://redd.it/1ix9zef
Medium
Building AI Agents for JupyterLab using Notebook Intelligence
It is now possible to build AI Agents for JupyterLab and access from Copilot Chat UI, using Notebook Intelligence!
Django Devs: What do you wish your project had in place before you were hired?
I'm considering starting a start-up web project that will likely have to be built on a framework such as Django.
As I'm in the very early concept phase, I'm looking to understand what information and level of detail I should have in place before hiring my first dev, (and/ or if a Django dev is a cost effective way of helping me take it from concept to a clear plan, before execution)?
I'd also be keen to understand if I'd need any other types of resource/ roles to get going, or if a Django dev is all that I'd need. Any sort of guidance on start up documentation I should have completed or suggests from this experienced community would be greatly appreciated! Thanks!
/r/django
https://redd.it/1iwz88b
I'm considering starting a start-up web project that will likely have to be built on a framework such as Django.
As I'm in the very early concept phase, I'm looking to understand what information and level of detail I should have in place before hiring my first dev, (and/ or if a Django dev is a cost effective way of helping me take it from concept to a clear plan, before execution)?
I'd also be keen to understand if I'd need any other types of resource/ roles to get going, or if a Django dev is all that I'd need. Any sort of guidance on start up documentation I should have completed or suggests from this experienced community would be greatly appreciated! Thanks!
/r/django
https://redd.it/1iwz88b
Reddit
From the django community on Reddit
Explore this post and more from the django community
Beginner learning - Function base or Class Base approach
English isn't my first language, so sorry about the grammar, and weird way organize sentence. I end up here is because after researching the community for Django I find out the English community were way more helpful.
Goal for learning Django : Planning to learn the Django fundamental and fully understand the idea of how it's work, not just using it by following other's tutorial making stuff. I want to reach the level that I can only using documents and my brain to create something I like.
Background :
\- 6 months in my self-taught journey, knowing all basic fundamental concepts and syntax of Python, HTML, CSS, Javascript. Mainly trying to focusing on the backend. For Django I had follow their tutorial, and recently I'm read the book "Django for Beginners(5th Edition)"
Problem:
\- I can see the benefit of Class-base approach more fit into DRY principle.
\- BUT ! I had a feeling that I'm not fully get the idea of class, class inheritance or the idea of OOP. I think I understand the concepts of class , but when come to using it. It's always had the unsure what I'm doing.
\- So, for beginning of the Django learning
/r/djangolearning
https://redd.it/1ixlqjb
English isn't my first language, so sorry about the grammar, and weird way organize sentence. I end up here is because after researching the community for Django I find out the English community were way more helpful.
Goal for learning Django : Planning to learn the Django fundamental and fully understand the idea of how it's work, not just using it by following other's tutorial making stuff. I want to reach the level that I can only using documents and my brain to create something I like.
Background :
\- 6 months in my self-taught journey, knowing all basic fundamental concepts and syntax of Python, HTML, CSS, Javascript. Mainly trying to focusing on the backend. For Django I had follow their tutorial, and recently I'm read the book "Django for Beginners(5th Edition)"
Problem:
\- I can see the benefit of Class-base approach more fit into DRY principle.
\- BUT ! I had a feeling that I'm not fully get the idea of class, class inheritance or the idea of OOP. I think I understand the concepts of class , but when come to using it. It's always had the unsure what I'm doing.
\- So, for beginning of the Django learning
/r/djangolearning
https://redd.it/1ixlqjb
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Connecting a Ubuntu server to a webpage using flask
I’ve been trying to connect a python code on a web sever to a webpage, and the main way I’ve tried this was flask. I believe I set everything up correctly, but no luck. If anyone has a good tutorial on how to complete this properly it will be appreciated.
/r/flask
https://redd.it/1iwtccd
I’ve been trying to connect a python code on a web sever to a webpage, and the main way I’ve tried this was flask. I believe I set everything up correctly, but no luck. If anyone has a good tutorial on how to complete this properly it will be appreciated.
/r/flask
https://redd.it/1iwtccd
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/1ixh4qh
# 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/1ixh4qh
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 script to download Spotify playlists without login
Repo link: https://github.com/invzfnc/spotify-downloader
What my project does
Hi everyone! I created a lightweight script that lists tracks from a public Spotify playlist and downloads them from YouTube Music.
Key Features
No premium required
No login or credentials required
Metadata is embedded in downloaded tracks
Downloads in higher quality (around 256 kbps)
Comparison/How is it different from other tools?
I found many tools requiring users to sign up for Spotify Developer account and setup credentials before everything else. This script uses the public Spotify API to retrieve track details, so there's no need to login or setup!
How's the music quality?
YouTube Music offers streams with higher bitrate (around 256 kbps) compared to YouTube (128 kbps). This script chooses and downloads the best quality audio from YouTube Music without taking up too much storage space.
Dependencies/Libraries?
Users are required to install innertube, SpotAPI, yt-dlp and FFmpeg for this script to work.
Target audience
Anyone who is looking to save their Spotify playlists to local storage, without wanting to login to any platform, and wants something with decent bitrate (\~256 kbps)
If you find this project useful or it helped you, feel free to give it a star! I'd really appreciate any feedback!
/r/Python
https://redd.it/1ixlsux
Repo link: https://github.com/invzfnc/spotify-downloader
What my project does
Hi everyone! I created a lightweight script that lists tracks from a public Spotify playlist and downloads them from YouTube Music.
Key Features
No premium required
No login or credentials required
Metadata is embedded in downloaded tracks
Downloads in higher quality (around 256 kbps)
Comparison/How is it different from other tools?
I found many tools requiring users to sign up for Spotify Developer account and setup credentials before everything else. This script uses the public Spotify API to retrieve track details, so there's no need to login or setup!
How's the music quality?
YouTube Music offers streams with higher bitrate (around 256 kbps) compared to YouTube (128 kbps). This script chooses and downloads the best quality audio from YouTube Music without taking up too much storage space.
Dependencies/Libraries?
Users are required to install innertube, SpotAPI, yt-dlp and FFmpeg for this script to work.
Target audience
Anyone who is looking to save their Spotify playlists to local storage, without wanting to login to any platform, and wants something with decent bitrate (\~256 kbps)
If you find this project useful or it helped you, feel free to give it a star! I'd really appreciate any feedback!
/r/Python
https://redd.it/1ixlsux
GitHub
GitHub - invzfnc/spotify-downloader: Downloads Spotify playlists in high quality without login.
Downloads Spotify playlists in high quality without login. - invzfnc/spotify-downloader
Anybody know how to add an Async view to a DRF project .
because simply declaring the
/r/djangolearning
https://redd.it/1ix63w0
because simply declaring the
@api_view function as async and awaiting statements inside it doesn't work and it clashes with event loops . /r/djangolearning
https://redd.it/1ix63w0
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Anyone used UV package manager in production
Is it reliable to use it in production as it is comparatively new in the market.
Also has it any disadvantages that i should be aware of before pitching it to my manager.
Help would be appreciated.
Any other tool suggestions also appreciated
/r/Python
https://redd.it/1ixryec
Is it reliable to use it in production as it is comparatively new in the market.
Also has it any disadvantages that i should be aware of before pitching it to my manager.
Help would be appreciated.
Any other tool suggestions also appreciated
/r/Python
https://redd.it/1ixryec
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Session not being saved by the time a redirect happens
I have a React app that connects to a flask backend and I am trying to connect to the google calendar api. When I go to /login it redirects to /callback and I get the error: session state is missing. However, if I try to login after this, the login works. Does anyone have any advice on why the session is not being updated by the time the redirect happens?
Here are the functions in question:
app.config"SESSION_TYPE" = "filesystem"
app.config"SESSION_PERMANENT" = False
app.config"SESSION_USE_SIGNER" = True # Helps prevent tampering
app.config"SECRET_KEY" = secrets.tokenurlsafe(16)
Session(app)
@app.route("/login")
def login():
try:
authorizationurl, state = getflow().authorizationurl()
print(f"Generated state: {state}")
session"state" = state
session.modified = True
/r/flask
https://redd.it/1iwr13r
I have a React app that connects to a flask backend and I am trying to connect to the google calendar api. When I go to /login it redirects to /callback and I get the error: session state is missing. However, if I try to login after this, the login works. Does anyone have any advice on why the session is not being updated by the time the redirect happens?
Here are the functions in question:
app.config"SESSION_TYPE" = "filesystem"
app.config"SESSION_PERMANENT" = False
app.config"SESSION_USE_SIGNER" = True # Helps prevent tampering
app.config"SECRET_KEY" = secrets.tokenurlsafe(16)
Session(app)
@app.route("/login")
def login():
try:
authorizationurl, state = getflow().authorizationurl()
print(f"Generated state: {state}")
session"state" = state
session.modified = True
/r/flask
https://redd.it/1iwr13r
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Django is love, Django is life
College student here who has been using Django for almost 3 years now. I've built a couple solid projects, with one that has a healthy number of users (like 100-120 daily). Idk why, but I never meet other CS students at my school that use this framework. I go to an SEC school, though, so not like it's a bunch of serious development enthusiasts, but still. I preach it like it's my religion. I've gotten so invested in building little tools for it (e.g., base classes centered around general CRUD operations, dynamic serializers, etc.). I swear I'm a wizard at the ORM at this point, too (still have yet to see an ORM that I like even a fraction as much). I absolutely love this framework.
I routinely try to convince myself to branch out and try other things, but I just can't escape Django. I hate NextJS (I don't subscribe much to the JS-for-everything obsession) and most other things just have so little out-of-the-box functionality. The only other thing I've been able to truly appreciate is SpringBoot just due to its similar level of maturity, but I just don't feel like getting good at Java dependency management.
/r/django
https://redd.it/1ixn22y
College student here who has been using Django for almost 3 years now. I've built a couple solid projects, with one that has a healthy number of users (like 100-120 daily). Idk why, but I never meet other CS students at my school that use this framework. I go to an SEC school, though, so not like it's a bunch of serious development enthusiasts, but still. I preach it like it's my religion. I've gotten so invested in building little tools for it (e.g., base classes centered around general CRUD operations, dynamic serializers, etc.). I swear I'm a wizard at the ORM at this point, too (still have yet to see an ORM that I like even a fraction as much). I absolutely love this framework.
I routinely try to convince myself to branch out and try other things, but I just can't escape Django. I hate NextJS (I don't subscribe much to the JS-for-everything obsession) and most other things just have so little out-of-the-box functionality. The only other thing I've been able to truly appreciate is SpringBoot just due to its similar level of maturity, but I just don't feel like getting good at Java dependency management.
/r/django
https://redd.it/1ixn22y
Reddit
From the django community on Reddit
Explore this post and more from the django community
Is Using Django with Vanilla JavaScript Unusual? Seeking Advice for Freelance Full Stack Development
Hey everyone!
I recently completed CS50 Web and decided to dive into my first freelance project using Django and vanilla JavaScript. My goal was to build a Single Page Application (SPA) with dynamic functionality, but as I progressed, I realized I might be taking an unconventional approach. Here’s what I’ve been doing:
No JavaScript Framework: I’m sticking to vanilla JavaScript instead of using React, Vue, or Angular.
No Django Rest Framework (DRF): I’m building my APIs without DRF, relying on Django’s built-in capabilities.
PDF Generation with `window.print`: Instead of using a library, I’m using `window.print` to generate PDFs.
Desktop App Conversion: Late in development, I decided to turn the web app into a desktop app using Electron and PyInstaller.
While this approach has been a great learning experience, I can’t help but wonder if I’m reinventing the wheel or missing out on best practices.
My Questions for the Community:
1. Is using vanilla JavaScript with Django a bad idea for SPAs, or is it a valid approach for smaller projects?
2. Should I reconsider using DRF for APIs, or is Django’s built-in functionality sufficient?
3. Are there better alternatives for PDF generation and desktop app conversion that I should explore?
4. As I aspire to become a decent Full Stack Web Dev for freelance
/r/django
https://redd.it/1iy17yb
Hey everyone!
I recently completed CS50 Web and decided to dive into my first freelance project using Django and vanilla JavaScript. My goal was to build a Single Page Application (SPA) with dynamic functionality, but as I progressed, I realized I might be taking an unconventional approach. Here’s what I’ve been doing:
No JavaScript Framework: I’m sticking to vanilla JavaScript instead of using React, Vue, or Angular.
No Django Rest Framework (DRF): I’m building my APIs without DRF, relying on Django’s built-in capabilities.
PDF Generation with `window.print`: Instead of using a library, I’m using `window.print` to generate PDFs.
Desktop App Conversion: Late in development, I decided to turn the web app into a desktop app using Electron and PyInstaller.
While this approach has been a great learning experience, I can’t help but wonder if I’m reinventing the wheel or missing out on best practices.
My Questions for the Community:
1. Is using vanilla JavaScript with Django a bad idea for SPAs, or is it a valid approach for smaller projects?
2. Should I reconsider using DRF for APIs, or is Django’s built-in functionality sufficient?
3. Are there better alternatives for PDF generation and desktop app conversion that I should explore?
4. As I aspire to become a decent Full Stack Web Dev for freelance
/r/django
https://redd.it/1iy17yb
Reddit
From the django community on Reddit
Explore this post and more from the django community