add a custom form to Django allauth signup page
hi guys I have a form that I wanna display when signing up but I need a conditional depending on which account type how can I pass the information to a function that will return the appropriate form?
/r/django
https://redd.it/kw1kxj
hi guys I have a form that I wanna display when signing up but I need a conditional depending on which account type how can I pass the information to a function that will return the appropriate form?
/r/django
https://redd.it/kw1kxj
reddit
add a custom form to Django allauth signup page
hi guys I have a form that I wanna display when signing up but I need a conditional depending on which account type how can I pass the information...
Python newbie here trying to learn Flask. Need advice.
Hello all! I'm a newbie trying to learn Flask. Would really appreciate some advice on learning.
I chose to learn Flask because I spent around 2 weeks learning Python from zero, and wrote my first program with has only 35 lines of code. I wanna turn this into a web app and after googling for a while, I feel like Flask is the way to go.
I spent last weekend trying to follow the Flaks official tutorial . The setup part was smooth, but now I'm stuck at the database part since I have no idea what is that. Also I'm learning very slow, since I literally have to google everything in the tutorial to figure out what that means.
Am I learning in the right way? Is there anything I need to learn before diving into this official tutorial, giving that I'm still super new to Python and only learned it for 2 weeks?
Thanks all! Any suggestion is welcome :D
/r/flask
https://redd.it/kw5sy5
Hello all! I'm a newbie trying to learn Flask. Would really appreciate some advice on learning.
I chose to learn Flask because I spent around 2 weeks learning Python from zero, and wrote my first program with has only 35 lines of code. I wanna turn this into a web app and after googling for a while, I feel like Flask is the way to go.
I spent last weekend trying to follow the Flaks official tutorial . The setup part was smooth, but now I'm stuck at the database part since I have no idea what is that. Also I'm learning very slow, since I literally have to google everything in the tutorial to figure out what that means.
Am I learning in the right way? Is there anything I need to learn before diving into this official tutorial, giving that I'm still super new to Python and only learned it for 2 weeks?
Thanks all! Any suggestion is welcome :D
/r/flask
https://redd.it/kw5sy5
reddit
Python newbie here trying to learn Flask. Need advice.
Hello all! I'm a newbie trying to learn Flask. Would really appreciate some advice on learning. I chose to learn Flask because I spent around 2...
Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/kw47c7
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/kw47c7
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
Giant IPKernelApp Error Using Hydrogen in Atom
Starting a few days ago, after months without issue, I began having a giant error box keep popping up when editing my code in Atom. I believe it is from the Hydrogen plugin, the weird thing is even with this error the code still runs and does what I want it too.
I even created a new conda environment, installing only what I needed (pandas, geopandas, descartes, jupyter) and even when using the new environment I am getting this issue. I've tried upgrading ipykernel but it is already the most recent version.
I'm about to lose my mind having this giant red error box keep popping up 10 seconds after I exit it out. Apologies if this is not the right subreddit to post this, but if it isn't please point me in the right direction.
Error Message: "IPKernelApp ERROR | Exception in message handler: Traceback (most recent call last): File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/kernelbase.py", line 268, in dispatchshell yield gen.maybefuture(handler(stream, idents, msg)) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/tornado/gen.py", line 762, in run value = future.result() File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/tornado/gen.py", line 234, in wrapper yielded = ctxrun(next, result) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/kernelbase.py", line 583, in completerequest matches = yield gen.maybefuture(self.docomplete(code, cursorpos)) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/ipkernel.py", line 360, in docomplete return self.experimentaldocomplete(code, cursorpos) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/ipkernel.py", line
/r/IPython
https://redd.it/kw34bp
Starting a few days ago, after months without issue, I began having a giant error box keep popping up when editing my code in Atom. I believe it is from the Hydrogen plugin, the weird thing is even with this error the code still runs and does what I want it too.
I even created a new conda environment, installing only what I needed (pandas, geopandas, descartes, jupyter) and even when using the new environment I am getting this issue. I've tried upgrading ipykernel but it is already the most recent version.
I'm about to lose my mind having this giant red error box keep popping up 10 seconds after I exit it out. Apologies if this is not the right subreddit to post this, but if it isn't please point me in the right direction.
Error Message: "IPKernelApp ERROR | Exception in message handler: Traceback (most recent call last): File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/kernelbase.py", line 268, in dispatchshell yield gen.maybefuture(handler(stream, idents, msg)) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/tornado/gen.py", line 762, in run value = future.result() File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/tornado/gen.py", line 234, in wrapper yielded = ctxrun(next, result) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/kernelbase.py", line 583, in completerequest matches = yield gen.maybefuture(self.docomplete(code, cursorpos)) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/ipkernel.py", line 360, in docomplete return self.experimentaldocomplete(code, cursorpos) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/ipkernel.py", line
/r/IPython
https://redd.it/kw34bp
reddit
Giant IPKernelApp Error Using Hydrogen in Atom
Starting a few days ago, after months without issue, I began having a giant error box keep popping up when editing my code in Atom. I believe it...
sqlalchemy filtering on relationship
Want to check if a value is present in a relationship using sqlalchemy. Have a customer table set up as --
class Customer(Base):
Approvers = relationship("AuthUser", secondary=links.LinkCustomerUser, cascade="all, delete")
so, a query as
session.query(Customer).filter(Customer.Uuid == <somevalue>).first()
would give me a list of approvers.
Is there a way, I can check if a value AuthUser.Id is present in the list of approvers in the query itself?
In short, I want to check if given **AuthUser.Id** is present in
/r/flask
https://redd.it/kw98rs
Want to check if a value is present in a relationship using sqlalchemy. Have a customer table set up as --
class Customer(Base):
Approvers = relationship("AuthUser", secondary=links.LinkCustomerUser, cascade="all, delete")
so, a query as
session.query(Customer).filter(Customer.Uuid == <somevalue>).first()
would give me a list of approvers.
Is there a way, I can check if a value AuthUser.Id is present in the list of approvers in the query itself?
In short, I want to check if given **AuthUser.Id** is present in
LinkCustomerUser or not./r/flask
https://redd.it/kw98rs
Amazing Widget with Python
https://www.youtube.com/watch?v=Wnn5fjXx25o&t=468s
/r/flask
https://redd.it/kwcmz3
https://www.youtube.com/watch?v=Wnn5fjXx25o&t=468s
/r/flask
https://redd.it/kwcmz3
YouTube
Amazing Widget with Python | Onscreen digital clock | Desktop Widget with Python
Digital Clock OnScreen in Real Time with Python
#python #digitalclock #widget
Source code:- https://pysnakeblog.blogspot.com/2021/01/amazing-widget-with-python-onscreen.html
#python #digitalclock #widget
Source code:- https://pysnakeblog.blogspot.com/2021/01/amazing-widget-with-python-onscreen.html
Python changed the way I think
I started to learn python during the beginning stages of pandemic. One thing i learned during the journey with python is that mistakes are part and parcel of learning. Do you agree with me that getting bugs while running a program teaches you a lot than a tutorial video? Someday while we debugging our code and spent whole day but still can't figure out the bug and next day within 15 minutes you figure out that you have forget to put collon :)
Don't give up! But Sometimes its ok to take rest when everything is going against you and comeback later.
So guys what is your life lesson which you have learned during the journey with python. I would love to hear that.
/r/Python
https://redd.it/kwalp2
I started to learn python during the beginning stages of pandemic. One thing i learned during the journey with python is that mistakes are part and parcel of learning. Do you agree with me that getting bugs while running a program teaches you a lot than a tutorial video? Someday while we debugging our code and spent whole day but still can't figure out the bug and next day within 15 minutes you figure out that you have forget to put collon :)
Don't give up! But Sometimes its ok to take rest when everything is going against you and comeback later.
So guys what is your life lesson which you have learned during the journey with python. I would love to hear that.
/r/Python
https://redd.it/kwalp2
reddit
Python changed the way I think
I started to learn python during the beginning stages of pandemic. One thing i learned during the journey with python is that mistakes are part...
I made a decentralised, secure and anonymous networking backend...
Holy shit this project took a while
This is my pride and joy
My way of paying back the community
A decentralised, secure and anonymous networking backend.
https://github.com/Footsiefat/Tiresias_Backend
Give the demo app linked in there a shot and give me some feedback please.
/r/Python
https://redd.it/kw7qr5
Holy shit this project took a while
This is my pride and joy
My way of paying back the community
A decentralised, secure and anonymous networking backend.
https://github.com/Footsiefat/Tiresias_Backend
Give the demo app linked in there a shot and give me some feedback please.
/r/Python
https://redd.it/kw7qr5
GitHub
Footsiefat/Tiresias_Backend
Repo for my work on the tiresias(backend part) project. Currently unfinished but feel free to have a look. - Footsiefat/Tiresias_Backend
VSCode users: why do you prefer it over PyCharm?
Do you prefer VSCode over PyCharm? Why?
Is it the price? Or the versatility (handling more than just Python)? Or something else?
I can't live without my PyCharm (Pro), trying to understand how other devs manage without it. :D
/r/Python
https://redd.it/kwbck9
Do you prefer VSCode over PyCharm? Why?
Is it the price? Or the versatility (handling more than just Python)? Or something else?
I can't live without my PyCharm (Pro), trying to understand how other devs manage without it. :D
/r/Python
https://redd.it/kwbck9
reddit
VSCode users: why do you prefer it over PyCharm?
Do you prefer VSCode over PyCharm? Why? Is it the price? Or the versatility (handling more than just Python)? Or something else? I can't live...
django question answer field match
I have a question answer quiz. I have 2 models **Question** and **Answer**. I want to have 2 pages. On the first page there will be a **Question** model where the user will write the question and the answer to that question. On the second page I will display these questions and accordingly the **Answer** model where the customer enters the answer and then check if it is equal to the \*\* answer\_question \*\* of the Question. But I could not do that so call each question **Answer** and show it in html.
​
**models.py** \-->
​
from django.db import models
# Create your models here.
class Question(models.Model):
question=models.CharField(max_length=100)
answer_question=models.CharField(max_length=100, default=None)
def __str__(self):
return self.question
class Answer(models.Model):
questin=models.ForeignKey(Question, on_delete=models.CASCADE)
answer=models.CharField(max_length=100,blank=True)
/r/djangolearning
https://redd.it/kwfei9
I have a question answer quiz. I have 2 models **Question** and **Answer**. I want to have 2 pages. On the first page there will be a **Question** model where the user will write the question and the answer to that question. On the second page I will display these questions and accordingly the **Answer** model where the customer enters the answer and then check if it is equal to the \*\* answer\_question \*\* of the Question. But I could not do that so call each question **Answer** and show it in html.
​
**models.py** \-->
​
from django.db import models
# Create your models here.
class Question(models.Model):
question=models.CharField(max_length=100)
answer_question=models.CharField(max_length=100, default=None)
def __str__(self):
return self.question
class Answer(models.Model):
questin=models.ForeignKey(Question, on_delete=models.CASCADE)
answer=models.CharField(max_length=100,blank=True)
/r/djangolearning
https://redd.it/kwfei9
reddit
django question answer field match
I have a question answer quiz. I have 2 models **Question** and **Answer**. I want to have 2 pages. On the first page there will be a **Question**...
Mozart: An optical music recognition system. Converts sheet music to a machine-readable version.
The aim of this project is to develop a sheet music reader. This is called Optical Music Recognition (OMR). Its objective is to convert sheet music to a machine-readable version. We take a simplified version where we convert an image of sheet music to a textual representation that can be further processed to produce midi files or audio files like wav or mp3.
GitHub: https://github.com/aashrafh/Mozart
/r/Python
https://redd.it/kwhsaa
The aim of this project is to develop a sheet music reader. This is called Optical Music Recognition (OMR). Its objective is to convert sheet music to a machine-readable version. We take a simplified version where we convert an image of sheet music to a textual representation that can be further processed to produce midi files or audio files like wav or mp3.
GitHub: https://github.com/aashrafh/Mozart
/r/Python
https://redd.it/kwhsaa
GitHub
GitHub - aashrafh/Mozart: An optical music recognition (OMR) system. Converts sheet music to a machine-readable version.
An optical music recognition (OMR) system. Converts sheet music to a machine-readable version. - aashrafh/Mozart
I submitted my first bug report and it was fixed within days
I am learning to use python and pygame to mess around with fluid simulations, and came across a strange bug. Stack overflow said it was a problem with python, the python bug tracker said it was a probably pygame, and the pygame contributors identified and fixed the problem within a day.
I think it is amazing how quick this community is to fix bugs and just wanted thank everyone who makes using python so easy and fun to learn.
: I know maybe not the best language for performance, but I was just looking for a fun project
/r/Python
https://redd.it/kwgv0x
I am learning to use python and pygame to mess around with fluid simulations, and came across a strange bug. Stack overflow said it was a problem with python, the python bug tracker said it was a probably pygame, and the pygame contributors identified and fixed the problem within a day.
I think it is amazing how quick this community is to fix bugs and just wanted thank everyone who makes using python so easy and fun to learn.
: I know maybe not the best language for performance, but I was just looking for a fun project
/r/Python
https://redd.it/kwgv0x
reddit
I submitted my first bug report and it was fixed within days
I am learning to use python and pygame to mess around with fluid simulations*, and came across a strange bug. Stack overflow said it was a problem...
Free Getting Started With Django Course
Hey everyone.
I've just posted a 9-hour long course on getting started with Django. It's specifically for beginners. In the course, you build a basic CRM application while learning all the fundamentals of Django. You also deploy the project using the Digital Ocean App Platform.
I'd love for you to check it out and let me know what your thoughts are!
Here is a link to the course: https://youtu.be/fOukA4Qh9QA
/r/django
https://redd.it/kwjq3l
Hey everyone.
I've just posted a 9-hour long course on getting started with Django. It's specifically for beginners. In the course, you build a basic CRM application while learning all the fundamentals of Django. You also deploy the project using the Digital Ocean App Platform.
I'd love for you to check it out and let me know what your thoughts are!
Here is a link to the course: https://youtu.be/fOukA4Qh9QA
/r/django
https://redd.it/kwjq3l
YouTube
Getting Started With Django Tutorial // Build a CRM
Hey everyone
This is a Django tutorial for beginners. In the course, you are going to learn all the fundamentals of Django and build a basic CRM system. You'll also learn how to deploy the project using Digital Ocean.
What you should know in Python before…
This is a Django tutorial for beginners. In the course, you are going to learn all the fundamentals of Django and build a basic CRM system. You'll also learn how to deploy the project using Digital Ocean.
What you should know in Python before…
"Face Mask Detection Using Tensorflow,Keras,Opencv & Python" Live Coding With Explanation.
https://youtu.be/4WmLOAd1BvY
/r/Python
https://redd.it/kwp3pc
https://youtu.be/4WmLOAd1BvY
/r/Python
https://redd.it/kwp3pc
YouTube
Face Mask Detection Using Python, Keras, OpenCV and Tensorflow| Detect Masks Real-time Video Streams
Github Repo Link: https://github.com/Chando0185/Face_Mask_Detection
🔥Number Sign Recognition & Detection
Using Tensorflow Object Detection API & Python 👉🏻https://youtu.be/_Tb7ezV7ISs
🔥Harry Potter Invisible Cloak Using Python & Opencv 👉🏻https://yout…
🔥Number Sign Recognition & Detection
Using Tensorflow Object Detection API & Python 👉🏻https://youtu.be/_Tb7ezV7ISs
🔥Harry Potter Invisible Cloak Using Python & Opencv 👉🏻https://yout…
Thursday Daily Thread: Python careers!
Discussion of using Python in a professional environment, getting jobs in Python and more!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/kwtjgw
Discussion of using Python in a professional environment, getting jobs in Python and more!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/kwtjgw
reddit
Thursday Daily Thread: Python careers!
Discussion of using Python in a professional environment, getting jobs in Python and more! **This thread is not for recruitment, please see**...
An idle race game with pygame
Here is a youtube video(could be loud) and source code.
My first game and also it was my python learning project. I learned a lot of things how should/should not to do but at the end of this, there is unlimited improvements and at some point so I must go for another projects with good management and plans. There are shortcomings in the project and I had things in mind that wanted to add, but I didn't want to spend more time only one beginner project.
Anyway, thanks for your time. Stay safe.
/r/Python
https://redd.it/kws3xs
Here is a youtube video(could be loud) and source code.
My first game and also it was my python learning project. I learned a lot of things how should/should not to do but at the end of this, there is unlimited improvements and at some point so I must go for another projects with good management and plans. There are shortcomings in the project and I had things in mind that wanted to add, but I didn't want to spend more time only one beginner project.
Anyway, thanks for your time. Stay safe.
/r/Python
https://redd.it/kws3xs
YouTube
Python idle race game with pygame | Beginner project
A race game using pygame. If you are beginner for pygame and also interest in python you can check my github page and find source code.
https://github.com/bahoho/racegame_pygame/blob/main/a_race.py
https://github.com/bahoho/racegame_pygame/blob/main/a_race.py
What if?
What if 100,000 users should send a request to my flask app simultaneously? How will the app behave in such conditions? What if my sqlalchemy db table was filled with 100,000 rows, how long would db queries take?
I am new to flask (2 months), built 2 projects but have never had so many persons visit my web apps. Anyone with these experience should please share
/r/flask
https://redd.it/kwkez1
What if 100,000 users should send a request to my flask app simultaneously? How will the app behave in such conditions? What if my sqlalchemy db table was filled with 100,000 rows, how long would db queries take?
I am new to flask (2 months), built 2 projects but have never had so many persons visit my web apps. Anyone with these experience should please share
/r/flask
https://redd.it/kwkez1
reddit
What if?
What if 100,000 users should send a request to my flask app simultaneously? How will the app behave in such conditions? What if my sqlalchemy db...
Multi-vendor Ecommerce Website Using Django | Pre-Release
In this video I'll tell you a little bit about my free upcoming Django course. The project we're going to build in this video series will be called Interiorshop. This is a multi-vendor ecommerce website where people can sign up and sell products on your webshop.
The website will be built using these technologies:
\-Django
\-Bulma CSS
\-Stripe (Payment gateway)
\-Sendgrid (for sending e-mails)
Here is a 4 min introduction to the course if you want to see a little demo:
https://www.youtube.com/watch?v=jmc0gV6\_NE0
The course will be split into three parts and I will try to publish them as soon as possible. If you want notification when I publish the parts, you need to subscribe and click the bell to get e-mail notifications :-)
/r/djangolearning
https://redd.it/kx224b
In this video I'll tell you a little bit about my free upcoming Django course. The project we're going to build in this video series will be called Interiorshop. This is a multi-vendor ecommerce website where people can sign up and sell products on your webshop.
The website will be built using these technologies:
\-Django
\-Bulma CSS
\-Stripe (Payment gateway)
\-Sendgrid (for sending e-mails)
Here is a 4 min introduction to the course if you want to see a little demo:
https://www.youtube.com/watch?v=jmc0gV6\_NE0
The course will be split into three parts and I will try to publish them as soon as possible. If you want notification when I publish the parts, you need to subscribe and click the bell to get e-mail notifications :-)
/r/djangolearning
https://redd.it/kx224b
YouTube
Django Ecommerce Website With Multiple Vendors Tutorial | For Beginners | Pre-Release
In this video I'll tell you a little bit about my upcoming Django course. The project we're going to build in this video series will be called Interiorshop. In this Django tutorial series, we will build everything from scratch.
At the end of the series…
At the end of the series…
Understanding the Django ORM
Hey Everyone,
I wrote a tutorial on Django's ORM, exploring the underlying SQL and how to use the ORM's API.
Here's a link to the tutorial: Understanding the Django ORM
If you think of a way to make it better or I missed something, let me know!
/r/djangolearning
https://redd.it/kwtn25
Hey Everyone,
I wrote a tutorial on Django's ORM, exploring the underlying SQL and how to use the ORM's API.
Here's a link to the tutorial: Understanding the Django ORM
If you think of a way to make it better or I missed something, let me know!
/r/djangolearning
https://redd.it/kwtn25
Engineer To Developer
Understanding the Django ORM | Engineer To Developer
Django provides a built-in ORM (Object-Relational-Mapper) that allows us to work with a SQL database using Python classes and objects—this is a nice abstraction. Still, for beginners, it can be a source of confusion. Throughout this tutorial, we will be exploring…
One-to-many relationship in Todo App
Hi, this is my first flask project. In my todo program, I'm trying to create a one-to-many relationship, such that, each user has many tasks. The issue I am facing is that every user is accessing every task in the table and I'm not sure how to fix that.
**The tables:**
class Users(db.Model):
id = db.Column(db.Integer, primary_key=True, nullable=False)
username = db.Column(db.String(20), unique=True, nullable=False)
password = db.Column(db.String(50), nullable=False)
tasks = db.relationship('Todo', backref='owner')
class Todo(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(100), nullable=False)
owner_id = db.Column(db.Integer, db.ForeignKey('users.id'))
**Todo routes:**
@app.route("/tasks", methods=["GET"])
@login_required
def tasks():
"""User tasks"""
# show all todos
todo_list = Todo.query.all()
/r/flask
https://redd.it/kx2kpb
Hi, this is my first flask project. In my todo program, I'm trying to create a one-to-many relationship, such that, each user has many tasks. The issue I am facing is that every user is accessing every task in the table and I'm not sure how to fix that.
**The tables:**
class Users(db.Model):
id = db.Column(db.Integer, primary_key=True, nullable=False)
username = db.Column(db.String(20), unique=True, nullable=False)
password = db.Column(db.String(50), nullable=False)
tasks = db.relationship('Todo', backref='owner')
class Todo(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(100), nullable=False)
owner_id = db.Column(db.Integer, db.ForeignKey('users.id'))
**Todo routes:**
@app.route("/tasks", methods=["GET"])
@login_required
def tasks():
"""User tasks"""
# show all todos
todo_list = Todo.query.all()
/r/flask
https://redd.it/kx2kpb
reddit
One-to-many relationship in Todo App
Hi, this is my first flask project. In my todo program, I'm trying to create a one-to-many relationship, such that, each user has many tasks. The...