Flask Library to make uploading files to your db & server quick and simple
​
Flask File Upload
Hi guys,
If you require a library to make uploading files with Flask super easy then please take a look at flask-file-upload
https://github.com/joegasewicz/flask-file-upload
This library is active & new feature requests are more than welcome, as is your feedback!
thanks for looking
Joe
/r/flask
https://redd.it/l7dho5
​
Flask File Upload
Hi guys,
If you require a library to make uploading files with Flask super easy then please take a look at flask-file-upload
https://github.com/joegasewicz/flask-file-upload
This library is active & new feature requests are more than welcome, as is your feedback!
thanks for looking
Joe
/r/flask
https://redd.it/l7dho5
How to show a number labels for a notebook?
Sorry if this is too simple but I've been trying to look for an answer for this and I just cannot find it anywhere.
I'm gonna give a simple tutorial for some scipy stuff on jupyter notebook and I want my students to know which cell of the notebook I'm at. The input/output number of the cell doesn't help since it changes according to the number of cells you've run before.
Thank you for your answers.
/r/JupyterNotebooks
https://redd.it/l7g354
Sorry if this is too simple but I've been trying to look for an answer for this and I just cannot find it anywhere.
I'm gonna give a simple tutorial for some scipy stuff on jupyter notebook and I want my students to know which cell of the notebook I'm at. The input/output number of the cell doesn't help since it changes according to the number of cells you've run before.
Thank you for your answers.
/r/JupyterNotebooks
https://redd.it/l7g354
reddit
How to show a number labels for a notebook?
Sorry if this is too simple but I've been trying to look for an answer for this and I just cannot find it anywhere. I'm gonna give a simple...
Iterate throught all objects
how can I iterate through all django objects and change a value for them?
/r/django
https://redd.it/l7nlrv
how can I iterate through all django objects and change a value for them?
/r/django
https://redd.it/l7nlrv
reddit
Iterate throught all objects
how can I iterate through all django objects and change a value for them?
25 IPython Tips for Your Next Advent of Code
https://switowski.com/blog/25-ipython-tips-for-your-next-advent-of-code
/r/IPython
https://redd.it/l7osqt
https://switowski.com/blog/25-ipython-tips-for-your-next-advent-of-code
/r/IPython
https://redd.it/l7osqt
Sebastian Witowski
25 IPython Tips for Your Next Advent of Code
I don't always do the Advent of Code challenges. But when I do, I do them in IPython. Let me show you why.
Starting celery, celery beat in google app engine?
We want to host a Django app using Google App Engine, using celery with redis task broker. Celery, and celery beat can be started locally using scripts/commands, but how do we start the same on the app engine?
The documentation handles python 2.7, so we are a bit in the dark, so things are a bit in the dark. Can someone help me out?
/r/django
https://redd.it/l7s6xd
We want to host a Django app using Google App Engine, using celery with redis task broker. Celery, and celery beat can be started locally using scripts/commands, but how do we start the same on the app engine?
The documentation handles python 2.7, so we are a bit in the dark, so things are a bit in the dark. Can someone help me out?
/r/django
https://redd.it/l7s6xd
reddit
Starting celery, celery beat in google app engine?
We want to host a Django app using Google App Engine, using celery with redis task broker. Celery, and celery beat can be started locally using...
Just launched Buzzbomb, my B2B platform built with Django (took 3 months to code!!)
Hey guys,
🎉 I just launched https://buzzbomb.com/ on Product Hunt, you can see it here! https://www.producthunt.com/posts/influencers-by-buzzbomb
So happy to have finally launched after coding for 3 months (although I guess there's more to come). I will be posting about the journey on my YouTube channel (including all the revenue metrics) if you want to follow along.
I'm trying to build 12 Startups in 12 Months for 2021 so yeah - will be an interesting year 😅. Next month I will be doing a daily video on my YouTube channel on the coding progress (sort of like a personal standup diary), but which also be showing the code I write etc. if you're interested!
I built this with Django + Vue.js, Django has my heart and will be using it for all the projects I build!
/r/django
https://redd.it/l7vc04
Hey guys,
🎉 I just launched https://buzzbomb.com/ on Product Hunt, you can see it here! https://www.producthunt.com/posts/influencers-by-buzzbomb
So happy to have finally launched after coding for 3 months (although I guess there's more to come). I will be posting about the journey on my YouTube channel (including all the revenue metrics) if you want to follow along.
I'm trying to build 12 Startups in 12 Months for 2021 so yeah - will be an interesting year 😅. Next month I will be doing a daily video on my YouTube channel on the coding progress (sort of like a personal standup diary), but which also be showing the code I write etc. if you're interested!
I built this with Django + Vue.js, Django has my heart and will be using it for all the projects I build!
/r/django
https://redd.it/l7vc04
Buzzbomb
Find influencers in seconds | Make a viral bang online with Buzzbomb
Try buzzbomb's suite of marketing products for your internet business today.
This post has:
Hello! I made a little Program
which gets statistics about this post!
It should be update every 20 seconds.
This post has 654 Upvotes!
-----
It has 81 Downvotes
-----
and 117 comments!
-----
The 3 top comments are from:
1. u/BimphyRedixler
|_Upvotes: 129
|_First word: I
|_Last word: account
2. u/Exodus111
|_Upvotes: 36
|_First word: EditingThisToSeeIfICangeTheFirstWordSetting.
|_Last word: AlsoChangingThisLOL!😂
3. u/CaminoFr
|_Upvotes: 19
|_First word: ",
|_Last word: None
Note: Sometimes theres a Person with lesser upvotes on place 1, If people are disliking comments, the reddit api does weird things!
Second note: The Up/Downvotes and comments are NOT accurate!
Last update: 2021-01-29 18:29:47 CET
total updates: 540
Latest comment by: u/Valtsu0
-----
First word: too
-----
Last word: long
-----
This idea was inspired by u/Krukerfluk
Krukerfluk's post: https://www.reddit.com/r/Python/comments/hoolsm/this_post_has/
My code on Github: https://github.com/Jonathan357611/Reddit-comment-statistics
This program is hosted on a Raspberry pi zero!
/r/Python
https://redd.it/l7u2m3
Hello! I made a little Program
which gets statistics about this post!
It should be update every 20 seconds.
This post has 654 Upvotes!
-----
It has 81 Downvotes
-----
and 117 comments!
-----
The 3 top comments are from:
1. u/BimphyRedixler
|_Upvotes: 129
|_First word: I
|_Last word: account
2. u/Exodus111
|_Upvotes: 36
|_First word: EditingThisToSeeIfICangeTheFirstWordSetting.
|_Last word: AlsoChangingThisLOL!😂
3. u/CaminoFr
|_Upvotes: 19
|_First word: ",
|_Last word: None
Note: Sometimes theres a Person with lesser upvotes on place 1, If people are disliking comments, the reddit api does weird things!
Second note: The Up/Downvotes and comments are NOT accurate!
Last update: 2021-01-29 18:29:47 CET
total updates: 540
Latest comment by: u/Valtsu0
-----
First word: too
-----
Last word: long
-----
This idea was inspired by u/Krukerfluk
Krukerfluk's post: https://www.reddit.com/r/Python/comments/hoolsm/this_post_has/
My code on Github: https://github.com/Jonathan357611/Reddit-comment-statistics
This program is hosted on a Raspberry pi zero!
/r/Python
https://redd.it/l7u2m3
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Made the snake game for the Windows console
It only works in windows because it uses os.system('cls') and a library for getting user keyboard input called msvcrt.
Code
​
https://preview.redd.it/kmzbnq9w87e61.png?width=730&format=png&auto=webp&s=33dfbab4c69bf3466edf36e2eaa8d4254f98dba8
/r/Python
https://redd.it/l7j86b
It only works in windows because it uses os.system('cls') and a library for getting user keyboard input called msvcrt.
Code
​
https://preview.redd.it/kmzbnq9w87e61.png?width=730&format=png&auto=webp&s=33dfbab4c69bf3466edf36e2eaa8d4254f98dba8
/r/Python
https://redd.it/l7j86b
GitHub
tomimara52/ConsoleSnake
Snake game in your windows, linux or macOS console - tomimara52/ConsoleSnake
How to apply not required on model field?
I have a post model that I'm trying to apply not required on image field. Basically, what I'm trying to do is when a user creates a new post, he or she does not need to upload an image. Right now the way it is set up, if image is not uploaded it gives error:
/r/django
https://redd.it/l87vr5
I have a post model that I'm trying to apply not required on image field. Basically, what I'm trying to do is when a user creates a new post, he or she does not need to upload an image. Right now the way it is set up, if image is not uploaded it gives error:
"The 'post_image' attribute has no file associated with it" . I tried with blank=True, null=True, but it does not work. What am I missing here? Is there something that I need to do on ModelForm? Any help will be greatly appreciated. Thank you. Here is the code snippet at Pastebin ./r/django
https://redd.it/l87vr5
Pastebin
Django - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
How to Deploy Django-React App on Digital Ocean/ AWS?
This will be my first time deployment of django react app.
Facing lots of issue while doing it.
Can some experience hand help me here or atleast point me to the right direction?
Thanks
/r/django
https://redd.it/l8e111
This will be my first time deployment of django react app.
Facing lots of issue while doing it.
Can some experience hand help me here or atleast point me to the right direction?
Thanks
/r/django
https://redd.it/l8e111
reddit
How to Deploy Django-React App on Digital Ocean/ AWS?
This will be my first time deployment of django react app. Facing lots of issue while doing it. Can some experience hand help me here or...
Saturday Daily Thread: Share your resources!
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/l88hac
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/l88hac
reddit
Saturday Daily Thread: Share your resources!
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...
In this tutorial we will automate (with Python) financial analysis and create an Excel sheet from Python. We will use Python to get 10 years of financial statements and use Revenue, Earnings Per Share (EPS) and Free Cash Flow (FCF) to create the Excel sheet to analyze the company.
https://youtu.be/TaF8aPahj1g
/r/Python
https://redd.it/l8f8qo
https://youtu.be/TaF8aPahj1g
/r/Python
https://redd.it/l8f8qo
YouTube
Automate Financial Analysis in Excel - Easy with Python - Full Tutorial
In this tutorial, we will automate financial analysis in excel.
- We will use Python to achieve that.
- The full code is available in Jupyter notebook
- This will Automate Financial Analysis in Excel
In this video, you will learn
- How to create multiple…
- We will use Python to achieve that.
- The full code is available in Jupyter notebook
- This will Automate Financial Analysis in Excel
In this video, you will learn
- How to create multiple…
Contribution For Beginners.
I started Django project, and I am looking to beginners like me to help each other, so check the repo:
link: https://github.com/osamamhd/ivyTasks
/r/django
https://redd.it/l7tqb5
I started Django project, and I am looking to beginners like me to help each other, so check the repo:
link: https://github.com/osamamhd/ivyTasks
/r/django
https://redd.it/l7tqb5
GitHub
osamamhd/ivyTasks
Tasks App with Ivy Lee Technique. Contribute to osamamhd/ivyTasks development by creating an account on GitHub.
Looking for a good naming convention for user-uploaded media files?
When uploading a media file, for example, an image inside ImageField, you can customize the filename by passing a function to the "upload\_to" argument.
Simplified example:
def rename_image(instance, filename):
return "new_name.jpg"
class Profile(Model):
picture = ImageField(upload_to=rename_image)
​
Assuming that you don't care about the original filename, I can see there are a few options to rename the file:
1. Don't rename it and leave the name as the original file -> "cool pic i took on the seawalk.jpg"
2. Use the ID of the instance you are creating (in this case Profile ID) -> "1.jpg"
3. Use a random unique hash -> "h3gdy652gshj372gs72t7.jpg"
4. Use another related field (for example the username) -> "peter\_steve.jpg"
Not sure if there are other options.
* Option 1 could have name collisions or a huge discrepancy between filenames.
* Option 2 is not possible in many cases since Django doesn't allow to get the ID of an instance that doesn't exist yet.
* Option 4 if the user decides to change his username, the image will now have a different username in the filename (not a big deal but what's
/r/django
https://redd.it/l8iafj
When uploading a media file, for example, an image inside ImageField, you can customize the filename by passing a function to the "upload\_to" argument.
Simplified example:
def rename_image(instance, filename):
return "new_name.jpg"
class Profile(Model):
picture = ImageField(upload_to=rename_image)
​
Assuming that you don't care about the original filename, I can see there are a few options to rename the file:
1. Don't rename it and leave the name as the original file -> "cool pic i took on the seawalk.jpg"
2. Use the ID of the instance you are creating (in this case Profile ID) -> "1.jpg"
3. Use a random unique hash -> "h3gdy652gshj372gs72t7.jpg"
4. Use another related field (for example the username) -> "peter\_steve.jpg"
Not sure if there are other options.
* Option 1 could have name collisions or a huge discrepancy between filenames.
* Option 2 is not possible in many cases since Django doesn't allow to get the ID of an instance that doesn't exist yet.
* Option 4 if the user decides to change his username, the image will now have a different username in the filename (not a big deal but what's
/r/django
https://redd.it/l8iafj
reddit
Looking for a good naming convention for user-uploaded media files?
When uploading a media file, for example, an image inside ImageField, you can customize the filename by passing a function to the "upload\_to"...
How to successfully deploy Django React App on your Digital Ocean
I have encountered a number of issue while doing the deployment.
Can someone point me to the right direction?
/r/djangolearning
https://redd.it/l8e2o3
I have encountered a number of issue while doing the deployment.
Can someone point me to the right direction?
/r/djangolearning
https://redd.it/l8e2o3
reddit
How to successfully deploy Django React App on your Digital Ocean
I have encountered a number of issue while doing the deployment. Can someone point me to the right direction?
I created a video about Neural Networks that is specifically aimed at Python developers! If you understand the Code, you understand how to create a Neural Network from Scratch! The video took me 200h to create and is fully animated! Hope it helps you guys :)
https://youtube.com/watch?v=9RN2Wr8xvro&feature=share
/r/Python
https://redd.it/l8jvev
https://youtube.com/watch?v=9RN2Wr8xvro&feature=share
/r/Python
https://redd.it/l8jvev
YouTube
Neural Networks Explained from Scratch using Python
When I started learning Neural Networks from scratch a few years ago, I did not think about just looking at some Python code or similar. I found it quite hard to understand all the concepts behind Neural Networks (e.g. Bias, Backpropagation, ...). Now I know…
Many to many relationship?
Hey. So in the past I have used one to one relationships with Flask SQLAlchemy, but I can't seem to wrap my head around many to many. I have three Tables:
* User
* Product
* Order
I need User to have access to Product, and order
I need product to have access to Order and User
I need Order to have access to User and Product
​
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String(255), nullable=False)
password = db.Column(db.String(255), nullable=False)
store_url = db.Column(db.String(200), nullable=True)
activated = db.Column(db.Boolean, default=False, nullable=False)
acc_id = db.Column(db.String(50), nullable=True)
class Product(db.Model):
__tablename__ = 'products'
id = db.Column(db.Integer, primary_key=True)
store_name = db.Column(db.String(255), nullable=False)
item_name = db.Column(db.String(255), nullable=False)
/r/flask
https://redd.it/l8fpfb
Hey. So in the past I have used one to one relationships with Flask SQLAlchemy, but I can't seem to wrap my head around many to many. I have three Tables:
* User
* Product
* Order
I need User to have access to Product, and order
I need product to have access to Order and User
I need Order to have access to User and Product
​
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String(255), nullable=False)
password = db.Column(db.String(255), nullable=False)
store_url = db.Column(db.String(200), nullable=True)
activated = db.Column(db.Boolean, default=False, nullable=False)
acc_id = db.Column(db.String(50), nullable=True)
class Product(db.Model):
__tablename__ = 'products'
id = db.Column(db.Integer, primary_key=True)
store_name = db.Column(db.String(255), nullable=False)
item_name = db.Column(db.String(255), nullable=False)
/r/flask
https://redd.it/l8fpfb
reddit
Many to many relationship?
Hey. So in the past I have used one to one relationships with Flask SQLAlchemy, but I can't seem to wrap my head around many to many. I have three...
Why we don’t use python native enums
https://kodare.net/2020/11/17/why_we_dont_use_enums.html
/r/Python
https://redd.it/l8j9yx
https://kodare.net/2020/11/17/why_we_dont_use_enums.html
/r/Python
https://redd.it/l8j9yx
En kodare
Why we don’t use python native enums
Problem 1: no semantics
Would you be interested in a Django-allauth prettified template ?
When starting a project I usually spend quite some time making the authentication pages provided my Django-allauth looking pretty.
Would there be an interest to make a public repo with “prettified” templates?
Cheers
/r/django
https://redd.it/l8k9gh
When starting a project I usually spend quite some time making the authentication pages provided my Django-allauth looking pretty.
Would there be an interest to make a public repo with “prettified” templates?
Cheers
/r/django
https://redd.it/l8k9gh
reddit
Would you be interested in a Django-allauth prettified template ?
When starting a project I usually spend quite some time making the authentication pages provided my Django-allauth looking pretty. Would there...