Help me how to structure a model for a Django project.
I want to replicate https://www.sporcle.com/games/g/worldflags this quiz web app to have a better grasp on Django. I will be using react on frontend and Django on backend. In model I will have ImageField for flag image and Textfield for user input to guess the country. So how do I structure model so that each image(flag) holds the text(country name) like dictionary (key:value) i.e key=flag of usa , value=USA Or how do I do it. Thanks.
/r/django
https://redd.it/1c70s3y
I want to replicate https://www.sporcle.com/games/g/worldflags this quiz web app to have a better grasp on Django. I will be using react on frontend and Django on backend. In model I will have ImageField for flag image and Textfield for user input to guess the country. So how do I structure model so that each image(flag) holds the text(country name) like dictionary (key:value) i.e key=flag of usa , value=USA Or how do I do it. Thanks.
/r/django
https://redd.it/1c70s3y
Add Stripe subscriptions to Django in 7 minutes 💵
Hi fellow Django-ers🐎
I wrote a short guide showing how to add Stripe subscriptions to Django extremely quickly - using as little code as possible.
The guide includes local webhook testing and uses Stripe's client-only checkout and customer portal.
If you're interested, here's the post: Add Stripe subscriptions to Django in 7 minutes 💵
I hope that you're having a good day. I'll answer any questions quickly.
https://preview.redd.it/ogjyesipl8vc1.png?width=704&format=png&auto=webp&s=e8c17914d5827f33084772c09153f675aaeed6a1
​
/r/django
https://redd.it/1c72zol
Hi fellow Django-ers🐎
I wrote a short guide showing how to add Stripe subscriptions to Django extremely quickly - using as little code as possible.
The guide includes local webhook testing and uses Stripe's client-only checkout and customer portal.
If you're interested, here's the post: Add Stripe subscriptions to Django in 7 minutes 💵
I hope that you're having a good day. I'll answer any questions quickly.
https://preview.redd.it/ogjyesipl8vc1.png?width=704&format=png&auto=webp&s=e8c17914d5827f33084772c09153f675aaeed6a1
​
/r/django
https://redd.it/1c72zol
Photondesigner
Add Stripe subscriptions to Django in 7 minutes 💵
We'll add the ability for users to pay subscriptions in Django extremely quickly, including local webhook testing.
Open Sourcing a Python Project the Right Way in 2024
I recently open-sourced a package and the tooling was a bit of a struggle. I decided to write down the steps & all the tools needed to open-source a Python package in a scalable way that invite users and contributors.
https://jonathanadly.com/open-sourcing-a-python-project-the-right-way-in-2024
Happy to hear your feedback!
/r/Python
https://redd.it/1c70x8m
I recently open-sourced a package and the tooling was a bit of a struggle. I decided to write down the steps & all the tools needed to open-source a Python package in a scalable way that invite users and contributors.
https://jonathanadly.com/open-sourcing-a-python-project-the-right-way-in-2024
Happy to hear your feedback!
/r/Python
https://redd.it/1c70x8m
Jonathan's blog
Open Sourcing a Python Project the Right Way in 2024
Every Python developer I've talked to has written some code that others would find useful. At the same time, they've all spent days, if not longer, wrestling with the tooling and packaging that comes with the language. My aim with this article is to ...
Has PyPI ceased all support?
Does anyone know what’s going on behind the scenes of PyPI (who maintains `pip install`)? It seems like they’ve stopped processing support tickets over a month ago.
I’ve hit the data limit for my package [PyBoy\](https://github.com/baekalfen/pyboy), and I immediately posted a ticket to get the limit increased (as others have successfully done). But after more than a month, and several attempts at contacting the support team, I’ve heard nothing back, and I’ve run out of options.
Does anyone know what’s happening, or how to get a comment from PyPI?
My ticket is this one: https://github.com/pypi/support/issues/3757
/r/Python
https://redd.it/1c6y1pi
Does anyone know what’s going on behind the scenes of PyPI (who maintains `pip install`)? It seems like they’ve stopped processing support tickets over a month ago.
I’ve hit the data limit for my package [PyBoy\](https://github.com/baekalfen/pyboy), and I immediately posted a ticket to get the limit increased (as others have successfully done). But after more than a month, and several attempts at contacting the support team, I’ve heard nothing back, and I’ve run out of options.
Does anyone know what’s happening, or how to get a comment from PyPI?
My ticket is this one: https://github.com/pypi/support/issues/3757
/r/Python
https://redd.it/1c6y1pi
GitHub
GitHub - Baekalfen/PyBoy: Game Boy emulator written in Python
Game Boy emulator written in Python. Contribute to Baekalfen/PyBoy development by creating an account on GitHub.
PyPDFForm now lets you create widgets without Acrobat
Hello (https://www.reddit.com/r/Python/)! Earlier this year I made a post about my open source project PyPDFForm and got some really nice feedbacks from you guys.
I have been since then continuously working on it and I'd love to share you two really cool features that were newly added to the library.
The first one is, like what the title says, the library finally supports creating a subset of widgets through code now. One of the previous hard dependency for PyPDFForm was that it requires a PDF template that was prepared using another tool, namely Adobe Acrobat or some web based ones like DocFly. Well now, at least for text field, checkbox, and dropdown, you can do it through plain Python code. I personally find this a huge milestone of the project and if you are interested in this new feature checkout the documentation here.
The second new feature, which is actually not quite new because this was how PyPDFForm worked back in its ancestral stage, is that now you can fill a PDF form "in place", meaning when you fill it this way, the output PDF will look like as if it's filled manually. The reason why this got removed was because of a bug related to text field, where
/r/Python
https://redd.it/1c7aioh
Hello (https://www.reddit.com/r/Python/)! Earlier this year I made a post about my open source project PyPDFForm and got some really nice feedbacks from you guys.
I have been since then continuously working on it and I'd love to share you two really cool features that were newly added to the library.
The first one is, like what the title says, the library finally supports creating a subset of widgets through code now. One of the previous hard dependency for PyPDFForm was that it requires a PDF template that was prepared using another tool, namely Adobe Acrobat or some web based ones like DocFly. Well now, at least for text field, checkbox, and dropdown, you can do it through plain Python code. I personally find this a huge milestone of the project and if you are interested in this new feature checkout the documentation here.
The second new feature, which is actually not quite new because this was how PyPDFForm worked back in its ancestral stage, is that now you can fill a PDF form "in place", meaning when you fill it this way, the output PDF will look like as if it's filled manually. The reason why this got removed was because of a bug related to text field, where
/r/Python
https://redd.it/1c7aioh
Reddit
Python
The official Python community for Reddit! Stay up to date with the latest news, packages, and meta information relating to the Python programming language.
---
If you have questions or are new to Python use r/LearnPython
---
If you have questions or are new to Python use r/LearnPython
An interview with Armin Ronacher, creator of Flask
https://onceamaintainer.substack.com/p/once-a-maintainer-armin-ronacher?r=2773u5&utm_campaign=post&utm_medium=web&triedRedirect=true
/r/flask
https://redd.it/1c7cbbc
https://onceamaintainer.substack.com/p/once-a-maintainer-armin-ronacher?r=2773u5&utm_campaign=post&utm_medium=web&triedRedirect=true
/r/flask
https://redd.it/1c7cbbc
Once a Maintainer
Once a Maintainer: Armin Ronacher
The creator of Flask on the role of the package index and how things have changed over time for open source creators
Login function is verifying credentials then logging into an admin account
https://redd.it/1c7ftab
@pythondaily
https://redd.it/1c7ftab
@pythondaily
Reddit
From the djangolearning community on Reddit: Login function is verifying credentials then logging into an admin account
Explore this post and more from the djangolearning community
+3 years of Django-only, and why I might not have gotten it all wrong.
I'm back with an update. Quick recap, back in November I wrote a message about how, after 3 years of Django-only, I found out I was creating MPAs (MultiPageApplications) and that there was also something called SPAs (SinglePageApplications), which require using a different frontend framework. Always late to the party, I had no clue.
In the meantime, I have an SPA demo online, django-react.com, made with Django in the back and ReactJS in the front. Feel free to take a look and ask me anything about what you see (it has registration, message board with ratings | pin | follow, account settings and an internal wallet to play around with tokens).
I would like to share my experiences, but there is a problem. Making the app forced me to deal with APIs (using APIView), Serializers, Cookies (vs Tokens), local and global States, and other complicated stuff, but most of it I probably don't really understand. And although I got it all to work, it shows strange behavior in some functionalities, which tells me I got some things wrong. So I can't write anything technical, instead, I'm going to try to explain the differences that stand out for me, in a way that
/r/django
https://redd.it/1c7cj3a
I'm back with an update. Quick recap, back in November I wrote a message about how, after 3 years of Django-only, I found out I was creating MPAs (MultiPageApplications) and that there was also something called SPAs (SinglePageApplications), which require using a different frontend framework. Always late to the party, I had no clue.
In the meantime, I have an SPA demo online, django-react.com, made with Django in the back and ReactJS in the front. Feel free to take a look and ask me anything about what you see (it has registration, message board with ratings | pin | follow, account settings and an internal wallet to play around with tokens).
I would like to share my experiences, but there is a problem. Making the app forced me to deal with APIs (using APIView), Serializers, Cookies (vs Tokens), local and global States, and other complicated stuff, but most of it I probably don't really understand. And although I got it all to work, it shows strange behavior in some functionalities, which tells me I got some things wrong. So I can't write anything technical, instead, I'm going to try to explain the differences that stand out for me, in a way that
/r/django
https://redd.it/1c7cj3a
Django-React
App
Web site created using create-react-app
Passing variable within string to TemplateTag?
Is it possible to somehow render a variable within a string when passing it into a template tag?
This is what I would like to do:
{% my_template_tag src="images/brand/{{ image_name }}.jpg alt="{{ image_name }} loading="lazy" %}
Or is the only way to rewrite the template tag to take in `*args` and then do something like this?
{% with src='images/brand/'|add:image_name|add:'.jpg' %}
#tag info here
{% endwith %}
​
/r/django
https://redd.it/1c7l3l6
Is it possible to somehow render a variable within a string when passing it into a template tag?
This is what I would like to do:
{% my_template_tag src="images/brand/{{ image_name }}.jpg alt="{{ image_name }} loading="lazy" %}
Or is the only way to rewrite the template tag to take in `*args` and then do something like this?
{% with src='images/brand/'|add:image_name|add:'.jpg' %}
#tag info here
{% endwith %}
​
/r/django
https://redd.it/1c7l3l6
Reddit
From the django community on Reddit
Explore this post and more from the django community
Django-middleware based inventory management database.
Hello. I'm a newbie looking to do a university project. It involves an inventory management database that will have an interactive front end, with simplified functionality. The front end will focus on practicality and not optimization or style, it's there just for the interactivity with the data in my database.
I'll be doing a presentation on my laptop, so hosting the website on localhost is a viable option at this time of the post. I am also thinking of dockerizing the final product.
I'm currently looking into the type of stack I'll need to pull this off. Thus far, I've picked :
-Postgresql for the database
-Nginx for hosting
-Django to connect my database to the front end
-Html, CSS, and vanilla JavaScript for the front end, since I have no experience with JavaScript at all.
I've read I can also use Django's built in local hosting capabilities for my project, so I can skip apache / nginx and another http gateway. The most important thing for me is for the project to be doable and not have an impossible stack of technologies I need to learn in a couple of months. I have experience with python in automation, which is why I picked
/r/django
https://redd.it/1c7ovk7
Hello. I'm a newbie looking to do a university project. It involves an inventory management database that will have an interactive front end, with simplified functionality. The front end will focus on practicality and not optimization or style, it's there just for the interactivity with the data in my database.
I'll be doing a presentation on my laptop, so hosting the website on localhost is a viable option at this time of the post. I am also thinking of dockerizing the final product.
I'm currently looking into the type of stack I'll need to pull this off. Thus far, I've picked :
-Postgresql for the database
-Nginx for hosting
-Django to connect my database to the front end
-Html, CSS, and vanilla JavaScript for the front end, since I have no experience with JavaScript at all.
I've read I can also use Django's built in local hosting capabilities for my project, so I can skip apache / nginx and another http gateway. The most important thing for me is for the project to be doable and not have an impossible stack of technologies I need to learn in a couple of months. I have experience with python in automation, which is why I picked
/r/django
https://redd.it/1c7ovk7
Reddit
From the django community on Reddit
Explore this post and more from the django community
Friday Daily Thread: r/Python Meta and Free-Talk Fridays
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1c7ir92
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1c7ir92
Redditinc
Reddit Rules
Reddit Rules - Reddit
Who are the best Flask Gurus/Experts you know
I'll start with Miguel Grinberg
/r/flask
https://redd.it/1c7rng5
I'll start with Miguel Grinberg
/r/flask
https://redd.it/1c7rng5
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Celery Worker, Beat & Redis - Best Practce in Production
Hello everyone,
I recently had an issue with my celery worker and beat, notifications stopped getting sent, I had to rebuild the docker images to get them to work.
The Issue:
After the rebuild, stale notifications started getting sent, including those that had already been sent before
My Question:
Are there recommended best practices for configuring Celery worker, beat and redis to prevent such an issue?
What would you generally recommend in setting up these services?
/r/django
https://redd.it/1c7snjq
Hello everyone,
I recently had an issue with my celery worker and beat, notifications stopped getting sent, I had to rebuild the docker images to get them to work.
The Issue:
After the rebuild, stale notifications started getting sent, including those that had already been sent before
My Question:
Are there recommended best practices for configuring Celery worker, beat and redis to prevent such an issue?
What would you generally recommend in setting up these services?
/r/django
https://redd.it/1c7snjq
Reddit
From the django community on Reddit
Explore this post and more from the django community
I used Flask to build this microblogging site in 6 hrs! It keeps your brain sane.
I grew tired of platforms like X and YouTube, noticing how they contribute to the decline of attention spans and critical thinking skills among my friends and others online. Keeping users hooked earn them a profit, not us.
NoHush is something where people don't stay confined within their own echo chambers. This is just a concept prototype, nothing fancy, but it gets the job done. It's UI is very brutalistic.
Special Feature is that you can share a post, and only that post will be shown, no distractions in between.
https://preview.redd.it/slnpqsubsevc1.png?width=456&format=png&auto=webp&s=eb97b3d3393acf4476fcef1cc0464df801f6677f
/r/flask
https://redd.it/1c7szye
I grew tired of platforms like X and YouTube, noticing how they contribute to the decline of attention spans and critical thinking skills among my friends and others online. Keeping users hooked earn them a profit, not us.
NoHush is something where people don't stay confined within their own echo chambers. This is just a concept prototype, nothing fancy, but it gets the job done. It's UI is very brutalistic.
Special Feature is that you can share a post, and only that post will be shown, no distractions in between.
https://preview.redd.it/slnpqsubsevc1.png?width=456&format=png&auto=webp&s=eb97b3d3393acf4476fcef1cc0464df801f6677f
/r/flask
https://redd.it/1c7szye
Python,Flask Framework And Django Course For Beginners | Udemy Free course for limited time
https://www.webhelperapp.com/pythonflask-framework-and-django-course-for-beginners/
/r/flask
https://redd.it/1c7ur14
https://www.webhelperapp.com/pythonflask-framework-and-django-course-for-beginners/
/r/flask
https://redd.it/1c7ur14
Free Udemy Coupons
Python,Flask Framework And Django Course For Beginners
Learn Python From Beginner To Advanced Level, Flask Framework From Beginning, Django Framework From Beginning, And Build A Project Using Django.
Django Scheduler
I have implemented a custom calendar for my Django application using Django Scheduler. So I have this edge case where I need to implement calendar blocking for unavailable days can be for some hours in a day or a few days. I am trying to get a workaround for this.
/r/django
https://redd.it/1c7v5pd
I have implemented a custom calendar for my Django application using Django Scheduler. So I have this edge case where I need to implement calendar blocking for unavailable days can be for some hours in a day or a few days. I am trying to get a workaround for this.
/r/django
https://redd.it/1c7v5pd
Reddit
From the django community on Reddit
Explore this post and more from the django community
Discussion Are there specific technical/scientific breakthroughs that have allowed the significant jump in maximum context length across multiple large language models recently?
Latest releases of models such as GPT-4 and Claude have a significant jump in the maximum context length (4/8k -> 128k+). The progress in terms of number of tokens that can be processed by these models sound remarkable in % terms.
What has led to this? Is this something that's happened purely because of increased compute becoming available during training? Are there algorithmic advances that have led to this?
/r/MachineLearning
https://redd.it/1c7pzf0
Latest releases of models such as GPT-4 and Claude have a significant jump in the maximum context length (4/8k -> 128k+). The progress in terms of number of tokens that can be processed by these models sound remarkable in % terms.
What has led to this? Is this something that's happened purely because of increased compute becoming available during training? Are there algorithmic advances that have led to this?
/r/MachineLearning
https://redd.it/1c7pzf0
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
django-admin-shellx: A Django Admin Web Shell using Xterm.js and Django Channels.
https://github.com/adinhodovic/django-admin-shellx
/r/django
https://redd.it/1c81iax
https://github.com/adinhodovic/django-admin-shellx
/r/django
https://redd.it/1c81iax
GitHub
GitHub - adinhodovic/django-admin-shellx: A Django Admin Web Shell using Xterm.js and Django Channels.
A Django Admin Web Shell using Xterm.js and Django Channels. - adinhodovic/django-admin-shellx
Hiring a Django back-end only dev
I have minimal experience with Django although I am able to recognize core functions due to some experience with Flask. I also have some experience with html/css/vanilla js.
I am have been in talks with a good backend Django developer who has minimal knowledge of FE development. Although I am confident I could develop the solution myself, I do not currently have the skills to develop at the speed that is required to produce an MVP.
However, my doubts stem from this developer's lack of experience with FE work. I thought I could just slap on a pre-built template like Metronic after the back-end views and models are complete but I am realizing this will still require a ton of work to configure, remove unused code, add graphs, tables etc etc. Am I overreacting or would it be smart to just hire another FE developer to assist with this or hire someone who has experience with both Django BE and Django templates?
​
/r/django
https://redd.it/1c833hd
I have minimal experience with Django although I am able to recognize core functions due to some experience with Flask. I also have some experience with html/css/vanilla js.
I am have been in talks with a good backend Django developer who has minimal knowledge of FE development. Although I am confident I could develop the solution myself, I do not currently have the skills to develop at the speed that is required to produce an MVP.
However, my doubts stem from this developer's lack of experience with FE work. I thought I could just slap on a pre-built template like Metronic after the back-end views and models are complete but I am realizing this will still require a ton of work to configure, remove unused code, add graphs, tables etc etc. Am I overreacting or would it be smart to just hire another FE developer to assist with this or hire someone who has experience with both Django BE and Django templates?
​
/r/django
https://redd.it/1c833hd
ThemeForest
Metronic | Bootstrap HTML, VueJS, React, Angular, Asp.Net, Django & Laravel Admin Dashboard Template
...