When using Firebase Auth with Django, where do you store user settings?
If I want to host my app on AWS, but want to use Firebase Auth (since Cognito sucks).
Do I use the DB on Firebase purely for Authentication and keep it separate from Django for security purposes?
Or do I integrate it into my Django models?
And where to store all users' settings, preferences, payment data, and special permissions, on my AWS DB or Firebase Auth DB?
For example, if I need to send an email newsletter, how do I fetch the emails? I need to access firebase (if so through a Django model?)? or should I keep a separate copy of necessary user data on my main AWS DB?
/r/django
https://redd.it/zx1c9r
If I want to host my app on AWS, but want to use Firebase Auth (since Cognito sucks).
Do I use the DB on Firebase purely for Authentication and keep it separate from Django for security purposes?
Or do I integrate it into my Django models?
And where to store all users' settings, preferences, payment data, and special permissions, on my AWS DB or Firebase Auth DB?
For example, if I need to send an email newsletter, how do I fetch the emails? I need to access firebase (if so through a Django model?)? or should I keep a separate copy of necessary user data on my main AWS DB?
/r/django
https://redd.it/zx1c9r
reddit
When using Firebase Auth with Django, where do you store user...
If I want to host my app on AWS, but want to use Firebase Auth (since Cognito sucks). Do I use the DB on Firebase purely for Authentication and...
P We finally got Text-to-PowerPoint working!! (Generative AI for Slides ✨)
Hey everyone!
Joe and I are students at Stanford, and we finally got a breakthrough on our side project.
We call it:
ChatBCG: Generative AI for Slides ✨
or: Text-to-PowerPoint
(Hope it will replace consultants one day :D)
Check out our launch Tweet for more info:
https://twitter.com/SilasAlberti/status/1608037989623414791
Do you have any feedback? We would really appreciate it :)
/r/MachineLearning
https://redd.it/zxab4m
Hey everyone!
Joe and I are students at Stanford, and we finally got a breakthrough on our side project.
We call it:
ChatBCG: Generative AI for Slides ✨
or: Text-to-PowerPoint
(Hope it will replace consultants one day :D)
Check out our launch Tweet for more info:
https://twitter.com/SilasAlberti/status/1608037989623414791
Do you have any feedback? We would really appreciate it :)
/r/MachineLearning
https://redd.it/zxab4m
Reddit
r/MachineLearning on Reddit: [P] We finally got Text-to-PowerPoint working!! (Generative AI for Slides ✨)
Posted by u/Mastersulm - 423 votes and 54 comments
This code ran fine in Pycharm, I have tried all sorts of variations, what am I missing?
/r/JupyterNotebooks
https://redd.it/zwqg8a
/r/JupyterNotebooks
https://redd.it/zwqg8a
How to add sitemap.xml and robots.txt in flask web app
​
Google search console status is Couldn't fetch for sitemap URL but its Success when setting it to static path in Flask
/r/flask
https://redd.it/zy101g
​
Google search console status is Couldn't fetch for sitemap URL but its Success when setting it to static path in Flask
/r/flask
https://redd.it/zy101g
Check if email exist in database without refresh page
Please i want do in my registration form check if user write user name or email it will automaticaly check if is use in db or not and let the user know if can use this email or not. Can comeon help me with that solution ? I use Flask and sql alchemy.
here is my db
class Costumer(db.Model, UserMixin):
# -------------------Uzivatel-------------------
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(50), unique=True)
email = db.Column(db.String(50), unique=True)
phone = db.Column(db.String(50), unique=True)
password = db.Column(db.String(200), unique=False)
# --------------- Fakturacni udaje ---------------------
faktura_first_name = db.Column(db.String(50), unique=False, nullable=True)
faktura_last_name = db.Column(db.String(50), unique=False, nullable=True)
faktura_city = db.Column(db.String(50), unique=False, nullable=True)
faktura_street = db.Column(db.String(50), unique=False, nullable=True)
/r/flask
https://redd.it/zwvjrr
Please i want do in my registration form check if user write user name or email it will automaticaly check if is use in db or not and let the user know if can use this email or not. Can comeon help me with that solution ? I use Flask and sql alchemy.
here is my db
class Costumer(db.Model, UserMixin):
# -------------------Uzivatel-------------------
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(50), unique=True)
email = db.Column(db.String(50), unique=True)
phone = db.Column(db.String(50), unique=True)
password = db.Column(db.String(200), unique=False)
# --------------- Fakturacni udaje ---------------------
faktura_first_name = db.Column(db.String(50), unique=False, nullable=True)
faktura_last_name = db.Column(db.String(50), unique=False, nullable=True)
faktura_city = db.Column(db.String(50), unique=False, nullable=True)
faktura_street = db.Column(db.String(50), unique=False, nullable=True)
/r/flask
https://redd.it/zwvjrr
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
How to ask for user input during the running?
I am trying to develop a web application by Flask that runs a function, this function does some calculations, in some point, it needs an input from the user, then this input will be taken to continue the calculations.
How can I achieve that in an efficient way in Flask?
(Note: the user input is required in different points for different purposes).
/r/flask
https://redd.it/zwo0zb
I am trying to develop a web application by Flask that runs a function, this function does some calculations, in some point, it needs an input from the user, then this input will be taken to continue the calculations.
How can I achieve that in an efficient way in Flask?
(Note: the user input is required in different points for different purposes).
/r/flask
https://redd.it/zwo0zb
reddit
How to ask for user input during the running?
I am trying to develop a web application by Flask that runs a function, this function does some calculations, in some point, it needs an input...
GitHub - lucidrains/PaLM-rlhf-pytorch: Implementation of RLHF (Reinforcement Learning with Human Feedback) on top of the PaLM architecture. Basically ChatGPT but with PaLM
https://github.com/lucidrains/PaLM-rlhf-pytorch
/r/Python
https://redd.it/zxy4hn
https://github.com/lucidrains/PaLM-rlhf-pytorch
/r/Python
https://redd.it/zxy4hn
GitHub
GitHub - lucidrains/PaLM-rlhf-pytorch: Implementation of RLHF (Reinforcement Learning with Human Feedback) on top of the PaLM architecture.…
Implementation of RLHF (Reinforcement Learning with Human Feedback) on top of the PaLM architecture. Basically ChatGPT but with PaLM - lucidrains/PaLM-rlhf-pytorch
Running Community Detection With Memgraph and Python NetworkX
https://memgraph.hashnode.dev/running-community-detection-with-memgraph-and-python-networkx
/r/Python
https://redd.it/zy17gx
https://memgraph.hashnode.dev/running-community-detection-with-memgraph-and-python-networkx
/r/Python
https://redd.it/zy17gx
Memgraph
Running Community Detection With Memgraph and Python NetworkX
Introduction
While the NetworkX package may be enough on its own to learn about graph theory and algorithms, in production, you will often require a permanent storage solution and additional graph analytics capabilities. Using Memgraph, an in-memory ...
While the NetworkX package may be enough on its own to learn about graph theory and algorithms, in production, you will often require a permanent storage solution and additional graph analytics capabilities. Using Memgraph, an in-memory ...
[R] Cramming: Training a Language Model on a Single GPU in One Day
https://arxiv.org/abs/2212.14034
/r/MachineLearning
https://redd.it/zy8c99
https://arxiv.org/abs/2212.14034
/r/MachineLearning
https://redd.it/zy8c99
Reddit
From the MachineLearning community on Reddit: [R] Cramming: Training a Language Model on a Single GPU in One Day
Posted by stonkttebayo - 363 votes and 25 comments
I need some feedback on the README for my Django Base Site
I have a new draft of the README for my Django Base Site, and I would love some feedback. The goal is to encourage more people to use it. I'm biased of course, but I think it would help beginners and seasoned veteran jump-start any new project.
/r/django
https://redd.it/zyak8e
I have a new draft of the README for my Django Base Site, and I would love some feedback. The goal is to encourage more people to use it. I'm biased of course, but I think it would help beginners and seasoned veteran jump-start any new project.
/r/django
https://redd.it/zyak8e
GitHub
GitHub - epicserve/django-base-site at feature/new-docs
The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that you need to jumpstart your next project. - GitHub - epicserve/...
mission-commander needs proper UI
Instead of rockets, it controls Transmission clients. Specifically, it adds the RSS functionality. More about it on github:
https://github.com/jure965/mission-commander
Currently it only has built-in admin pages, but has otherwise worked for me flawlessly for about two months. It is a Django project with Celery and is dockerized for easy deployment and a no mess experience.
If you are willing to learn and/or exercise Django templates, you are welcome to contribute. Project is small - under 5 models, and all work is voluntary. CSS framework(bootstrap, tailwind, ...) at your discretion, if you want to use one. I'll try to support you in any way I can, by answering questions you may have and by commenting the pull requests. In general, the following pages are in todo, but not limited to: login, feeds, torrents, transmission clients.
/r/djangolearning
https://redd.it/zy5dk6
Instead of rockets, it controls Transmission clients. Specifically, it adds the RSS functionality. More about it on github:
https://github.com/jure965/mission-commander
Currently it only has built-in admin pages, but has otherwise worked for me flawlessly for about two months. It is a Django project with Celery and is dockerized for easy deployment and a no mess experience.
If you are willing to learn and/or exercise Django templates, you are welcome to contribute. Project is small - under 5 models, and all work is voluntary. CSS framework(bootstrap, tailwind, ...) at your discretion, if you want to use one. I'll try to support you in any way I can, by answering questions you may have and by commenting the pull requests. In general, the following pages are in todo, but not limited to: login, feeds, torrents, transmission clients.
/r/djangolearning
https://redd.it/zy5dk6
GitHub
GitHub - jure965/mission-commander
Contribute to jure965/mission-commander development by creating an account on GitHub.
Deploying to Railway
So, I currently have my SECRET KEY and DEBUG in an env file and I’m using Python-decouple to implement them. However, Railway is crashing and it seems the only way I get an app deployed is by exposing my SECRET KEY. Is there a better way?
/r/django
https://redd.it/zyl0c0
So, I currently have my SECRET KEY and DEBUG in an env file and I’m using Python-decouple to implement them. However, Railway is crashing and it seems the only way I get an app deployed is by exposing my SECRET KEY. Is there a better way?
/r/django
https://redd.it/zyl0c0
reddit
Deploying to Railway
So, I currently have my SECRET KEY and DEBUG in an env file and I’m using Python-decouple to implement them. However, Railway is crashing and it...
Full-length tutorial on adding automated CI (continuous integration) to your Python projects with GitHub Actions
https://www.youtube.com/watch?v=x3hkXbOkfM8&list=PLbn3jWIXv_ibMS6CFOKMZkOHimDB9xdU2&index=1
/r/flask
https://redd.it/zy65qr
https://www.youtube.com/watch?v=x3hkXbOkfM8&list=PLbn3jWIXv_ibMS6CFOKMZkOHimDB9xdU2&index=1
/r/flask
https://redd.it/zy65qr
YouTube
Continuous Integration with GitHub Actions and Python - Part 1: Linting
Please consider supporting me on Patreon: https://www.patreon.com/programmingwithalex
GitHub Action pylinters: https://github.com/marketplace/actions/pylinter
GitHub test_repo: https://github.com/programmingwithalex/test_repo_pylinter_v1
00:00 - Introduction…
GitHub Action pylinters: https://github.com/marketplace/actions/pylinter
GitHub test_repo: https://github.com/programmingwithalex/test_repo_pylinter_v1
00:00 - Introduction…
How to change the passwords error messages
How do you customize the password error messages? More precisely, is there an error name for "password too common" or "password too short" like "unique" is an error name? Can I do some
self.fields["password1"].error_message = {"password_too_short": "password too short"}
kind of magic?
/r/django
https://redd.it/zym5ud
How do you customize the password error messages? More precisely, is there an error name for "password too common" or "password too short" like "unique" is an error name? Can I do some
self.fields["password1"].error_message = {"password_too_short": "password too short"}
kind of magic?
/r/django
https://redd.it/zym5ud
reddit
How to change the passwords error messages
How do you customize the password error messages? More precisely, is there an error name for "password too common" or "password too short" like...
How to prevent access to a route ?
How to prevent access to a route unless it has been called from another route. I have created a login page that accepts only one user ( username and password of admin) and after the user credentials is correct, it redirects to another route called /display. But this /display route can be accessed just by typing inside the search bar of the browser. I want to prevent the access, unless it is redirected from the login page. I felt using flask_admin and flask_login was too complex. If there is another method please suggest thanks.
/r/flask
https://redd.it/zyd1nl
How to prevent access to a route unless it has been called from another route. I have created a login page that accepts only one user ( username and password of admin) and after the user credentials is correct, it redirects to another route called /display. But this /display route can be accessed just by typing inside the search bar of the browser. I want to prevent the access, unless it is redirected from the login page. I felt using flask_admin and flask_login was too complex. If there is another method please suggest thanks.
/r/flask
https://redd.it/zyd1nl
reddit
How to prevent access to a route ?
How to prevent access to a route unless it has been called from another route. I have created a login page that accepts only one user ( username...
I want to add unit tests to my Django project but don't know where do i even start
Hey everyone,
I developped an app at my workplace (i'm not a developper officially) using Django, it allows users to login, view data, make comments on data X.
Since it is a quite simple CRUD app, i managed to make it work without any unit testing. I never did any unit tests in my small developper life (5 years).
Now they're asking me to add the option to send out emails containing data X.
I thought this feature would be a good use case for learning unit tests.
Where do i even start? Probably would have to start by something very simple to first get the hang of what unit testing is. Any roadmap to suggest?
I'm quite good at coding and getting stuff done using google (or OpenAI now...), but would like to become more of a real software developper and i know it starts with writing testable code.
Thanks guys.
/r/djangolearning
https://redd.it/zynykr
Hey everyone,
I developped an app at my workplace (i'm not a developper officially) using Django, it allows users to login, view data, make comments on data X.
Since it is a quite simple CRUD app, i managed to make it work without any unit testing. I never did any unit tests in my small developper life (5 years).
Now they're asking me to add the option to send out emails containing data X.
I thought this feature would be a good use case for learning unit tests.
Where do i even start? Probably would have to start by something very simple to first get the hang of what unit testing is. Any roadmap to suggest?
I'm quite good at coding and getting stuff done using google (or OpenAI now...), but would like to become more of a real software developper and i know it starts with writing testable code.
Thanks guys.
/r/djangolearning
https://redd.it/zynykr
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
How to save a list inside my a SQL Database model ?
How can I save a list inside a database model ?
testlist = ["name1". "name2", "name3"]
class Listing(models.Model):
listingprice = models.CharField(maxlength=100)
listingtype = models.CharField(maxlength=100)
listinglist = models.?????
/r/djangolearning
https://redd.it/zyio95
How can I save a list inside a database model ?
testlist = ["name1". "name2", "name3"]
class Listing(models.Model):
listingprice = models.CharField(maxlength=100)
listingtype = models.CharField(maxlength=100)
listinglist = models.?????
/r/djangolearning
https://redd.it/zyio95
reddit
How to save a list inside my a SQL Database model ?
How can I save a list inside a database model ? test_list = ["name1". "name2", "name3"] class Listing(models.Model): ...
Where am i going wrong
So im following [https://www.youtube.com/watch?v=sm1mokevMWk](https://www.youtube.com/watch?v=sm1mokevMWk) this tutorial and at 49:20 he heads towards the admin dashboard.
When i try the same thing i get a
main.models.ToDoList.DoesNotExist: ToDoList matching query does not exist.
On my cmd
Just to clarify this is my code in [views.py](https://views.py)
from django.shortcuts import render
from django.http import HttpResponse
from .models import ToDoList,Items
def index(response,id):
ls=ToDoList.objects.get(id=id)
item=ls.item_set.get(id=1)
return HttpResponse("<h1>%s</h1><br></br><p>%s</p>"%(ls.name,str(item.text)))
​
/r/djangolearning
https://redd.it/zy0x35
So im following [https://www.youtube.com/watch?v=sm1mokevMWk](https://www.youtube.com/watch?v=sm1mokevMWk) this tutorial and at 49:20 he heads towards the admin dashboard.
When i try the same thing i get a
main.models.ToDoList.DoesNotExist: ToDoList matching query does not exist.
On my cmd
Just to clarify this is my code in [views.py](https://views.py)
from django.shortcuts import render
from django.http import HttpResponse
from .models import ToDoList,Items
def index(response,id):
ls=ToDoList.objects.get(id=id)
item=ls.item_set.get(id=1)
return HttpResponse("<h1>%s</h1><br></br><p>%s</p>"%(ls.name,str(item.text)))
​
/r/djangolearning
https://redd.it/zy0x35
YouTube
Django For Beginners - Full Tutorial
Welcome to this Django complete course. In this video, I'll be covering all the important aspects of Django that as a beginner you need to know. We'll cover setting up a simple Django application, creating a database, allowing users to sign up, sign in, and…
OpenAI just rick rolled me...
https://imgur.com/a/cDLSnHw
Was tinkering around with how to write a python file to download a youtube video and was very interested to see what video it had suggested as a placeholder...
/r/Python
https://redd.it/zyyv9z
https://imgur.com/a/cDLSnHw
Was tinkering around with how to write a python file to download a youtube video and was very interested to see what video it had suggested as a placeholder...
/r/Python
https://redd.it/zyyv9z
Imgur
Post with 1 views.
Handling relations using Django REST Framework ModelSerializer
Hi there, I have been working with DRF for a few years. I currently work as a lead developer at a small Canadian company with a very complex piece of Django stack that is responsible for a relatively large cashflow (we were recently acquire by a very large company). I often see developers jumping into Python/Django world and get very confused about how to use DRF ModelSerializer, and sometimes devs get scared away by the amount of unknown abstraction behind ModelSerializer, they choose to use Serializer instead and implement a lot of the functionality that is already provided by ModelSerializer. So I finally sat down over Christmas break here and wrote this tutorial over the last couple of days, I hope that it helps to explain how to use ModelSerializer to handle model relationships:
https://github.com/oscarychen/deep-dive-drf-model-serializer-relations
It is kind of a difficult read as it touches a lot of nitty gritty implementation details, any suggestion is welcome.
/r/django
https://redd.it/zyuskh
Hi there, I have been working with DRF for a few years. I currently work as a lead developer at a small Canadian company with a very complex piece of Django stack that is responsible for a relatively large cashflow (we were recently acquire by a very large company). I often see developers jumping into Python/Django world and get very confused about how to use DRF ModelSerializer, and sometimes devs get scared away by the amount of unknown abstraction behind ModelSerializer, they choose to use Serializer instead and implement a lot of the functionality that is already provided by ModelSerializer. So I finally sat down over Christmas break here and wrote this tutorial over the last couple of days, I hope that it helps to explain how to use ModelSerializer to handle model relationships:
https://github.com/oscarychen/deep-dive-drf-model-serializer-relations
It is kind of a difficult read as it touches a lot of nitty gritty implementation details, any suggestion is welcome.
/r/django
https://redd.it/zyuskh
GitHub
GitHub - oscarychen/deep-dive-drf-model-serializer-relations: Deep dive the nuances of using Django REST Framework ModelSerializer…
Deep dive the nuances of using Django REST Framework ModelSerializer to read, create and update model relations - GitHub - oscarychen/deep-dive-drf-model-serializer-relations: Deep dive the nuances...