most snippets from djangosnippets.org seem obsolete (obviously), what's something you always carry around, in general ?
hi, good people.
https://djangosnippets.org/ was something I used as a reference in the past.
are there any snippets or code blocks you'd like to share ? related to python or django (or even django frontend). thanks.
/r/djangolearning
https://redd.it/12dpw6y
hi, good people.
https://djangosnippets.org/ was something I used as a reference in the past.
are there any snippets or code blocks you'd like to share ? related to python or django (or even django frontend). thanks.
/r/djangolearning
https://redd.it/12dpw6y
D Is all the talk about what GPT can do on Twitter and Reddit exaggerated or fairly accurate?
I saw this post on the r/ChatGPT subreddit, and I’ve been seeing similar talk on Twitter. There’s people talking about AGI, the singularity, and etc. I get that it’s cool, exciting, and fun; but some of the talk seems a little much? Like it reminds me of how the NFT bros would talk about blockchain technology.
Do any of the people making these kind of claims have a decent amount of knowledge on machine learning at all? The scope of my own knowledge is very limited, as I’ve only implemented and taken courses on models that are pretty old. So I’m here to ask for opinions from ya’ll. Is there some validity, or is it just people that don’t really understand what they’re saying and making grand claims (Like some sort of Dunning Kruger Effect)?
/r/MachineLearning
https://redd.it/12dz4hh
I saw this post on the r/ChatGPT subreddit, and I’ve been seeing similar talk on Twitter. There’s people talking about AGI, the singularity, and etc. I get that it’s cool, exciting, and fun; but some of the talk seems a little much? Like it reminds me of how the NFT bros would talk about blockchain technology.
Do any of the people making these kind of claims have a decent amount of knowledge on machine learning at all? The scope of my own knowledge is very limited, as I’ve only implemented and taken courses on models that are pretty old. So I’m here to ask for opinions from ya’ll. Is there some validity, or is it just people that don’t really understand what they’re saying and making grand claims (Like some sort of Dunning Kruger Effect)?
/r/MachineLearning
https://redd.it/12dz4hh
Reddit
From the ChatGPT community on Reddit: GPT-4 Week 3. Chatbots are yesterdays news. AI Agents are the future. The beginning of the…
Explore this post and more from the ChatGPT community
Becoming another user
Hey! Is there a way (preferably a plugin) that would allow a user to become another user?
My use case is that i want admins of the site be able to view the site as some other user temporarily.
/r/django
https://redd.it/12e9ze7
Hey! Is there a way (preferably a plugin) that would allow a user to become another user?
My use case is that i want admins of the site be able to view the site as some other user temporarily.
/r/django
https://redd.it/12e9ze7
Reddit
r/django on Reddit: Becoming another user
Posted by u/joelbytes - 6 votes and 5 comments
Wordle inspired me to make my own web-based word puzzle game, Syllacrostic, flask is used for the framework. There is a new puzzle every day. Let me know what you think!
http://www.syllacrostic.com
/r/flask
https://redd.it/12ekgw5
http://www.syllacrostic.com
/r/flask
https://redd.it/12ekgw5
Syllacrostic
Syllacrostic is a free, daily word puzzle that challenges your vocabulary and critical thinking skills.
Trouble with MDB bootstrap + pills navigation
I am trying to create an Admin panel using pills navigation. I have a couple issues. When I submit a form, it is no longer flashing messages from my base.html, and secondly I'd like to set it so that if I submit a form on pill 2, it stays on pill 2 rather than redirecting me back to the admin page with pill 1 selected.
Route
```
@app.route("/admin", methods=["GET", "POST"])
@login_required
def admin():
form = SearchUserForm()
if form.validate_on_submit():
user = User.query.filter_by(username=form.username.data).first()
if not user:
flash("That user does not exist. Please try again.")
return redirect(url_for("admin"))
else:
flash("User exists.")
return redirect(url_for("admin"))
return render_template("admin.html", title="Admin Page", form=form)
```
HTML
```
{% extends "base.html" %}
{% block content %}
<div class="container">
<div class="container my-3">
<!-- Jumbotron -->
/r/flask
https://redd.it/12eon9u
I am trying to create an Admin panel using pills navigation. I have a couple issues. When I submit a form, it is no longer flashing messages from my base.html, and secondly I'd like to set it so that if I submit a form on pill 2, it stays on pill 2 rather than redirecting me back to the admin page with pill 1 selected.
Route
```
@app.route("/admin", methods=["GET", "POST"])
@login_required
def admin():
form = SearchUserForm()
if form.validate_on_submit():
user = User.query.filter_by(username=form.username.data).first()
if not user:
flash("That user does not exist. Please try again.")
return redirect(url_for("admin"))
else:
flash("User exists.")
return redirect(url_for("admin"))
return render_template("admin.html", title="Admin Page", form=form)
```
HTML
```
{% extends "base.html" %}
{% block content %}
<div class="container">
<div class="container my-3">
<!-- Jumbotron -->
/r/flask
https://redd.it/12eon9u
Reddit
r/flask on Reddit: Trouble with MDB bootstrap + pills navigation
Posted by u/Montags25 - No votes and no comments
Library not found issues
Currently trying to install Thorlabs software to use alongside jupyter notebooks. Have installed the drivers and all relevant software. Error message as shown is given. Not sure what to do. Tried using add dll path with os and no luck.
​
Much appreciated if anyone can assist
https://preview.redd.it/wmmfjgkipgsa1.png?width=1276&format=png&auto=webp&v=enabled&s=8769f914d70099b0948e91b90ee236ffd4af3279
/r/JupyterNotebooks
https://redd.it/12ekwuo
Currently trying to install Thorlabs software to use alongside jupyter notebooks. Have installed the drivers and all relevant software. Error message as shown is given. Not sure what to do. Tried using add dll path with os and no luck.
​
Much appreciated if anyone can assist
https://preview.redd.it/wmmfjgkipgsa1.png?width=1276&format=png&auto=webp&v=enabled&s=8769f914d70099b0948e91b90ee236ffd4af3279
/r/JupyterNotebooks
https://redd.it/12ekwuo
Return Redirect Doesn't Work in Python if Statement
I have an if statement that checks if my Flask app has received a POST request. Inside the I statement, I want to redirect the user to another page of my flask app. This is the code I'm using:
@app.route('/convertingPlaylist', methods=['GET', 'POST'])
def convertingPlaylist():
if request.method == 'POST':
print("Done")
return redirect('/redirect')
else:
executor.submit(main)
return render_template('ConvertingPlaylist.html')
The else statement runs the mainfunction and renders my HTML simultaneously and works fine. However, when I create a post, I can see the post worked because is see 'Done' printed in the terminal, but I don't get redirected to the \\redirectpage. Here is the /redirectpage:
/r/flask
https://redd.it/12ea6hq
I have an if statement that checks if my Flask app has received a POST request. Inside the I statement, I want to redirect the user to another page of my flask app. This is the code I'm using:
@app.route('/convertingPlaylist', methods=['GET', 'POST'])
def convertingPlaylist():
if request.method == 'POST':
print("Done")
return redirect('/redirect')
else:
executor.submit(main)
return render_template('ConvertingPlaylist.html')
The else statement runs the mainfunction and renders my HTML simultaneously and works fine. However, when I create a post, I can see the post worked because is see 'Done' printed in the terminal, but I don't get redirected to the \\redirectpage. Here is the /redirectpage:
/r/flask
https://redd.it/12ea6hq
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
PEP 711 – PyBI: a standard format for distributing Python Binaries
https://peps.python.org/pep-0711/
/r/Python
https://redd.it/12efni5
https://peps.python.org/pep-0711/
/r/Python
https://redd.it/12efni5
Python Enhancement Proposals (PEPs)
PEP 711 – PyBI: a standard format for distributing Python Binaries | peps.python.org
“Like wheels, but instead of a pre-built python package, it’s a pre-built python interpreter”
Django Channels/Daphne - I am going insane.
SOLUTION EDIT:
Ran:
python3 -m pip install -r requirements.txt
Whereas I'd just used previously;
pip install -r requirements.txt
HOWEVER!
Plain old pip.exe was installing to one python environment, and then when I tried to run:
python3 manage.py startapp chat
It was pulling from a different environment.
Yes, this was all done inside the same virtual environment.
Huge thanks to u/codingranger. Copy pasted their explanation here for anyone who's interested:
>To explain the issue:
You have two programs: python3.exe and pip.exe. Those don't always point to the same underlying Python environment. So your pip.exe was installing to one environment and then when you ran the thing using python3.exe it didn't see the installed code. So using python3.exe -m pip
instead of pip.exe we can be 1000% sure no exceptions it's pointed to the same place both times. This is a good general habit to get in, just pretend pip.exe doesn't exist.
\--------------------------------------
Original Post
\--------------------------------------
Can somebody please help me?
Trying to practice using Channels and build a lil' webchat app but literally stuck at the get go. So started venv, installed django, installed channels and daphne, started project with django-admin.exe, andmodified asgi.py installed apps/asgi_installation in settings.py.
When I run:
/r/djangolearning
https://redd.it/12e36wx
SOLUTION EDIT:
Ran:
python3 -m pip install -r requirements.txt
Whereas I'd just used previously;
pip install -r requirements.txt
HOWEVER!
Plain old pip.exe was installing to one python environment, and then when I tried to run:
python3 manage.py startapp chat
It was pulling from a different environment.
Yes, this was all done inside the same virtual environment.
Huge thanks to u/codingranger. Copy pasted their explanation here for anyone who's interested:
>To explain the issue:
You have two programs: python3.exe and pip.exe. Those don't always point to the same underlying Python environment. So your pip.exe was installing to one environment and then when you ran the thing using python3.exe it didn't see the installed code. So using python3.exe -m pip
instead of pip.exe we can be 1000% sure no exceptions it's pointed to the same place both times. This is a good general habit to get in, just pretend pip.exe doesn't exist.
\--------------------------------------
Original Post
\--------------------------------------
Can somebody please help me?
Trying to practice using Channels and build a lil' webchat app but literally stuck at the get go. So started venv, installed django, installed channels and daphne, started project with django-admin.exe, andmodified asgi.py installed apps/asgi_installation in settings.py.
When I run:
/r/djangolearning
https://redd.it/12e36wx
Thoropass is hiring Engineers! (Django required)
Thoropass helps companies manage compliance, obtain security certifications, and build trust with enterprise customers.
​
**Senior Back End Software Engineer**
LatAm
**Staff Front End Software Engineer**
LatAm
/r/django
https://redd.it/12eznuk
Thoropass helps companies manage compliance, obtain security certifications, and build trust with enterprise customers.
​
**Senior Back End Software Engineer**
LatAm
**Staff Front End Software Engineer**
LatAm
/r/django
https://redd.it/12eznuk
boards.greenhouse.io
Senior Back End Software Engineer
LatAm
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?
Use this thread to chat about and share Python resources!
/r/Python
https://redd.it/12f4hre
Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?
Use this thread to chat about and share Python resources!
/r/Python
https://redd.it/12f4hre
Reddit
r/Python on Reddit: Saturday Daily Thread: Resource Request and Sharing! Daily Thread
Posted by u/Im__Joseph - No votes and no comments
What recommendations for a frontend UI with Flask?
I'm building a website to play poker. I have all the game logic running behind in the backend, but need a good way to build a front end with images, animations, custom buttons.
Does anyone have a recommendation?
With a tutorial recommendation if possible too.
I am currently just styling my html page with css and divs etc.
/r/flask
https://redd.it/12f1v4o
I'm building a website to play poker. I have all the game logic running behind in the backend, but need a good way to build a front end with images, animations, custom buttons.
Does anyone have a recommendation?
With a tutorial recommendation if possible too.
I am currently just styling my html page with css and divs etc.
/r/flask
https://redd.it/12f1v4o
Reddit
r/flask on Reddit: What recommendations for a frontend UI with Flask?
Posted by u/Cwlrs - 5 votes and 4 comments
model attribute in generics.ListView
At the very end of the 4th part of the Writing you first Django App tutorial, it states that both generic views,
/r/django
https://redd.it/12f7s78
At the very end of the 4th part of the Writing you first Django App tutorial, it states that both generic views,
generic.ListView and generic.DetailView "needs to know what model it will be acting upon. This is provided using the model attribute." However for generic.ListView, I noticed it doesn't need the model attribute to be set to work properly. Is it setting the model through the get_queryset method?/r/django
https://redd.it/12f7s78
Django Project
Writing your first Django app, part 4 | Django documentation
The web framework for perfectionists with deadlines.
PEP 695: Type Parameter Syntax has been accepted by the Steering Council
https://discuss.python.org/t/pep-695-type-parameter-syntax/21646/92?u=tusharc
/r/Python
https://redd.it/12f3glm
https://discuss.python.org/t/pep-695-type-parameter-syntax/21646/92?u=tusharc
/r/Python
https://redd.it/12f3glm
Discussions on Python.org
PEP 695: Type Parameter Syntax
Thoughts on PEP 695, rejection of PEP 677 and the future of typing syntax Since @thomas / the Steering Council asked the community for more thoughts on PEP 695, I thought I’d write something up. First and foremost, I think PEP 695 is really well thought…
Frontend for django
I know how to do the backend, but I don't know how to do the front. Am I correct in assuming that most pet projects start with the frontend? I know some js, should I start learning react?
/r/django
https://redd.it/12fku5j
I know how to do the backend, but I don't know how to do the front. Am I correct in assuming that most pet projects start with the frontend? I know some js, should I start learning react?
/r/django
https://redd.it/12fku5j
Reddit
r/django on Reddit: Frontend for django
Posted by u/malomalsky - No votes and 4 comments
INTERN
I am a student looking for an internship to validate my current year. I specialize in web development and have experience working with Django, Flask, and React. contact me at thabelkodjo@gmail.com
/r/flask
https://redd.it/12fqdk6
I am a student looking for an internship to validate my current year. I specialize in web development and have experience working with Django, Flask, and React. contact me at thabelkodjo@gmail.com
/r/flask
https://redd.it/12fqdk6
Reddit
r/flask on Reddit: INTERN
Posted by u/IndependenceTrue5636 - No votes and no comments
EP 684: A Per-Interpreter GIL Accepted
https://discuss.python.org/t/pep-684-a-per-interpreter-gil/19583/42
/r/Python
https://redd.it/12ffsif
https://discuss.python.org/t/pep-684-a-per-interpreter-gil/19583/42
/r/Python
https://redd.it/12ffsif
Discussions on Python.org
PEP 684: A Per-Interpreter GIL
My vote goes to no: make 3.12 safe, then remove the limitations. For example, PyMem_SetAllocator with PYMEM_DOMAIN_MEM or PYMEM_DOMAIN_OBJ could block creating independent GILs, and new PyMem_SetGlobalAllocator could be added. And, I guess setting memory…
Pandas 2.0 (with pyarrow) vs Pandas 1.3 - Performance Comparison
https://medium.com/@santiagobasulto/pandas-2-0-performance-comparison-3f56b4719f58
/r/Python
https://redd.it/12fgyui
https://medium.com/@santiagobasulto/pandas-2-0-performance-comparison-3f56b4719f58
/r/Python
https://redd.it/12fgyui
Medium
Pandas 2.0 vs Pandas 1.3 — Performance Comparison
EDIT/ERRATUM: I made the mistake of combining parse_dates with pyarrow dtype backend. When removed, pyarrow is A LOT faster (40X) reading…
Django Exportmanager with Templates
Is there an easy solution to integrate an Exportmanager with Export-Templates in Django admin?
The user should create his own template for an CSV-Export. He choose the columns he want to export.
Also it should possible to save the template to reuse the custom Export the next time.
Does anybody know if there is an plugin for this?
/r/djangolearning
https://redd.it/12ftsh2
Is there an easy solution to integrate an Exportmanager with Export-Templates in Django admin?
The user should create his own template for an CSV-Export. He choose the columns he want to export.
Also it should possible to save the template to reuse the custom Export the next time.
Does anybody know if there is an plugin for this?
/r/djangolearning
https://redd.it/12ftsh2
Reddit
r/djangolearning on Reddit: Django Exportmanager with Templates
Posted by u/Least-Trade-3991 - 1 vote and no comments
Port Issue
For Intro to Software Engineering class, deployed Flask App in Docker Container to Azure. Can connect on port 5000 (http://{ ipaddress}:5000) outside of university wifi network, but does not connect when within university wifi. Is this a port issue? Can someone suggest why this might be and what I may need to do to fix it? Thanks.
/r/flask
https://redd.it/12g547w
For Intro to Software Engineering class, deployed Flask App in Docker Container to Azure. Can connect on port 5000 (http://{ ipaddress}:5000) outside of university wifi network, but does not connect when within university wifi. Is this a port issue? Can someone suggest why this might be and what I may need to do to fix it? Thanks.
/r/flask
https://redd.it/12g547w
Reddit
r/flask on Reddit: Port Issue
Posted by u/Adamcp2013 - No votes and 3 comments
Trying to deploy a flask app to a custom domain
Hi friends, I’m still new to Python, but I made a simple flask app that I want to share with the world. I have a domain, and I hosting through Dreamhost. Ive looked around the internet for a tutorial or guide that can walk me through making it go live on my custom domain via Dreamhost. They have a tool called Passenger, specifically for Python and Ruby apps, but has anyone tried that? Any tips or youtube links you can point me to?
Would it be easier to add Wordpress to my domain and try to upload my flask app through that? Thanks
/r/flask
https://redd.it/12g0zp3
Hi friends, I’m still new to Python, but I made a simple flask app that I want to share with the world. I have a domain, and I hosting through Dreamhost. Ive looked around the internet for a tutorial or guide that can walk me through making it go live on my custom domain via Dreamhost. They have a tool called Passenger, specifically for Python and Ruby apps, but has anyone tried that? Any tips or youtube links you can point me to?
Would it be easier to add Wordpress to my domain and try to upload my flask app through that? Thanks
/r/flask
https://redd.it/12g0zp3
Reddit
r/flask on Reddit: Trying to deploy a flask app to a custom domain
Posted by u/MacheteRuxpin - 1 vote and 3 comments