Django templates in the frontend
Hi, do you recommend to use Django templates in the frontend instead of using react JS with libraries like these ones:
https://github.com/holasoftware/djangotemplateenginejs
https://github.com/chrisdickinson/plate
https://github.com/mozilla/nunjucks
https://github.com/cloudratha/djanjucks
/r/django
https://redd.it/12uts9x
Hi, do you recommend to use Django templates in the frontend instead of using react JS with libraries like these ones:
https://github.com/holasoftware/djangotemplateenginejs
https://github.com/chrisdickinson/plate
https://github.com/mozilla/nunjucks
https://github.com/cloudratha/djanjucks
/r/django
https://redd.it/12uts9x
GitHub
GitHub - holasoftware/djangotemplateenginejs: Django templates in javascript. Render all your django templates in the frontend.
Django templates in javascript. Render all your django templates in the frontend. - GitHub - holasoftware/djangotemplateenginejs: Django templates in javascript. Render all your django templates in...
MenuScript - Run Python Scripts from the MacOS menubar
I want to introduce you to a personal passion project I've built called MenuScript.
https://i.redd.it/k8mcrimzpcva1.gif
What is it?
MenuScript is an Open Source application for MacOS which allows you to run your must have Python Scripts from the menubar. MenuScript needs to know 3 things about the script you want to run, 1. The name (which can be anything), 2. The absolute path to the script e.g. 'user/name/folder/main.py' 3. The absolute path to the python executable in your virtual environment.
I built MenuScript because I've always found it somewhat annoying that running Python scripts requires working in the command line. Additionally I hate that I have to activate my venv to run my scripts since I don't install all my packages globally. For some of my more frequent scripts I just wanted to be able to point and shoot.
To build the app I used rumps and python, and compiled with py2app. Source is available in the repo, and you can download the .app file by visiting the releases page.
How it works?
MenuScript uses subprocess to pass a bash script that activates the venv for your target script, and then runs that script with the relevant dependencies. You can also use it without a venv
/r/Python
https://redd.it/12ut616
I want to introduce you to a personal passion project I've built called MenuScript.
https://i.redd.it/k8mcrimzpcva1.gif
What is it?
MenuScript is an Open Source application for MacOS which allows you to run your must have Python Scripts from the menubar. MenuScript needs to know 3 things about the script you want to run, 1. The name (which can be anything), 2. The absolute path to the script e.g. 'user/name/folder/main.py' 3. The absolute path to the python executable in your virtual environment.
I built MenuScript because I've always found it somewhat annoying that running Python scripts requires working in the command line. Additionally I hate that I have to activate my venv to run my scripts since I don't install all my packages globally. For some of my more frequent scripts I just wanted to be able to point and shoot.
To build the app I used rumps and python, and compiled with py2app. Source is available in the repo, and you can download the .app file by visiting the releases page.
How it works?
MenuScript uses subprocess to pass a bash script that activates the venv for your target script, and then runs that script with the relevant dependencies. You can also use it without a venv
/r/Python
https://redd.it/12ut616
GitHub
GitHub - mubranch/menuscript
Contribute to mubranch/menuscript development by creating an account on GitHub.
Running Linux scripts to update cloud servers - Production Environment: Ubuntu 20.04
Hello All...
so we manage multiple cloud servers( 50+) for clients. And as things goes - sometimes we need to run upgrades on the system...i.e. database backup failed...so we need to manually redo the backup which means - we have to notify the client that the backup failed...schedule downtime....etc...
we a small company - and most of the processes are documented....documented processes means that non-technical people can follow the instructions to the letter..as such should be able to do it...we don't use Ansible.....(too technical for some support staff)....
so I am thinking Jupyter allows for both documentation and execution of scripts.....
Has anyone here used Jupyter Notebooks in a production environment..to automate or simplify server management....
Any resources you can refer me to...would be appreciated....
/r/JupyterNotebooks
https://redd.it/12uw5up
Hello All...
so we manage multiple cloud servers( 50+) for clients. And as things goes - sometimes we need to run upgrades on the system...i.e. database backup failed...so we need to manually redo the backup which means - we have to notify the client that the backup failed...schedule downtime....etc...
we a small company - and most of the processes are documented....documented processes means that non-technical people can follow the instructions to the letter..as such should be able to do it...we don't use Ansible.....(too technical for some support staff)....
so I am thinking Jupyter allows for both documentation and execution of scripts.....
Has anyone here used Jupyter Notebooks in a production environment..to automate or simplify server management....
Any resources you can refer me to...would be appreciated....
/r/JupyterNotebooks
https://redd.it/12uw5up
I made a PyAutoGUI GUI, what do you think?
​
Demo
https://github.com/endrebodi/pyAutoGUI2
You select an option from the dropdown, click "Add", and the script is created line by line.
You can copy it later, or run it in the app itself.
What do you think, should I continue development?
/r/Python
https://redd.it/12uenpr
​
Demo
https://github.com/endrebodi/pyAutoGUI2
You select an option from the dropdown, click "Add", and the script is created line by line.
You can copy it later, or run it in the app itself.
What do you think, should I continue development?
/r/Python
https://redd.it/12uenpr
Intermittent django MySQL conection error
I recently used django for one of our projects! But recently after deploying it to production env ( deployed it on ec2 machines) , i'm intermittently getting few MySQL errors. We are using multi-threading in our views for some IO calls.
Following are the errors -
MySQLdb.OperationalError: (2005, "Unknown MySQL server host 'scalerv3.cluster-cefqnpdgdxcd.us-east-1.rds.amazonaws.com' (2)")
And
2013. Lost connection to MySQL server during query
I have kept connmaxage to 10 mins so that django doesn't tries to make alot of connection but somehow it's still making alot of connections
Would really need someone's help here and would like to know why this is happening!
Help me out here if someone has faced this earlier
/r/django
https://redd.it/12v1lte
I recently used django for one of our projects! But recently after deploying it to production env ( deployed it on ec2 machines) , i'm intermittently getting few MySQL errors. We are using multi-threading in our views for some IO calls.
Following are the errors -
MySQLdb.OperationalError: (2005, "Unknown MySQL server host 'scalerv3.cluster-cefqnpdgdxcd.us-east-1.rds.amazonaws.com' (2)")
And
2013. Lost connection to MySQL server during query
I have kept connmaxage to 10 mins so that django doesn't tries to make alot of connection but somehow it's still making alot of connections
Would really need someone's help here and would like to know why this is happening!
Help me out here if someone has faced this earlier
/r/django
https://redd.it/12v1lte
Reddit
r/django on Reddit: Intermittent django MySQL conection error
Posted by u/mohdey - No votes and no comments
Chat implementation
Guys any idea about implementing chat on django like realtime without redis .. only over https .
/r/django
https://redd.it/12u8yp2
Guys any idea about implementing chat on django like realtime without redis .. only over https .
/r/django
https://redd.it/12u8yp2
Reddit
r/django on Reddit: Chat implementation
Posted by u/sudo_nitesh - 4 votes and 8 comments
Where can I deploy websites that using python as a backend (web applications)
hello, I need a host that I can buy and use to deploy my web apps, the cheapest ever.
and if it possible that I deploy several webapps it would be amazing, as I need something to deploy all my projects on, and is this even possible?
/r/Python
https://redd.it/12v0d0e
hello, I need a host that I can buy and use to deploy my web apps, the cheapest ever.
and if it possible that I deploy several webapps it would be amazing, as I need something to deploy all my projects on, and is this even possible?
/r/Python
https://redd.it/12v0d0e
Reddit
r/Python on Reddit: Where can I deploy websites that using python as a backend (web applications)
Posted by u/YukkiiCode - 90 votes and 75 comments
Jupyter doesn’t show my files.
When going through the files in jupyter notebooks, I can’t find the files that are on my computer. If I follow the same file in my explorer and on jupyter, jupyter only shows me older folder names with the old files. If I change the folder name and whatever is in it, jupyter doesnt update it.
/r/JupyterNotebooks
https://redd.it/12vaewb
When going through the files in jupyter notebooks, I can’t find the files that are on my computer. If I follow the same file in my explorer and on jupyter, jupyter only shows me older folder names with the old files. If I change the folder name and whatever is in it, jupyter doesnt update it.
/r/JupyterNotebooks
https://redd.it/12vaewb
Reddit
r/JupyterNotebooks on Reddit: Jupyter doesn’t show my files.
Posted by u/-SchlauchbootlippeN- - 1 vote and no comments
Developing a Single Page App with Flask and Vue.js
https://testdriven.io/blog/developing-a-single-page-app-with-flask-and-vuejs/
/r/flask
https://redd.it/12vcsws
https://testdriven.io/blog/developing-a-single-page-app-with-flask-and-vuejs/
/r/flask
https://redd.it/12vcsws
testdriven.io
Developing a Single Page App with Flask and Vue.js
The following is a step-by-step walkthrough of how to set up a basic CRUD app with Vue and Flask.
Generating Django Models using LucidChart and ChatGPT
https://youtu.be/vFXKIBRTpP4
/r/django
https://redd.it/12vdn2y
https://youtu.be/vFXKIBRTpP4
/r/django
https://redd.it/12vdn2y
YouTube
Generating Django Models using LucidChart and ChatGPT
Django 5.x Technical Board Candidate Registration
https://www.djangoproject.com/weblog/2023/apr/22/technical-board-candidate-registration/
/r/django
https://redd.it/12vl1hs
https://www.djangoproject.com/weblog/2023/apr/22/technical-board-candidate-registration/
/r/django
https://redd.it/12vl1hs
Django Project
Django 5.x Technical Board Candidate Registration
Posted by Katie McLaughlin on April 22, 2023
Display information from another model in another admin model
I have two models in my Models.py; "Award" and "Status"
There is a link from User to Status to mark who made the update, from their the Status is linked to Award. This allows a user to update the status of a specific award over a period of time. It also ensures that if multiple people work on it and update the status it reflects the correct person who made the update. This is because the whole thing needs to be tracked each time someone "touches" it. Nothing can be deleted.
I would like to display the most current status inside the Admin table (where all awards would be list).
Here is my models.py.
class Award(models.Model):
datecreated = models.DateTimeField(autonowadd=True)
datemodified = models.DateTimeField(autonow=True)
firstname = models.CharField(maxlength=50, verbosename = "First Name")
lastname = models.CharField(maxlength=50, verbosename = "Last Name")
rank = models.CharField(maxlength=5, default=None,
choices=RANKCHOICES)
unit = models.CharField(maxlength=6,
/r/djangolearning
https://redd.it/12vjqp8
I have two models in my Models.py; "Award" and "Status"
There is a link from User to Status to mark who made the update, from their the Status is linked to Award. This allows a user to update the status of a specific award over a period of time. It also ensures that if multiple people work on it and update the status it reflects the correct person who made the update. This is because the whole thing needs to be tracked each time someone "touches" it. Nothing can be deleted.
I would like to display the most current status inside the Admin table (where all awards would be list).
Here is my models.py.
class Award(models.Model):
datecreated = models.DateTimeField(autonowadd=True)
datemodified = models.DateTimeField(autonow=True)
firstname = models.CharField(maxlength=50, verbosename = "First Name")
lastname = models.CharField(maxlength=50, verbosename = "Last Name")
rank = models.CharField(maxlength=5, default=None,
choices=RANKCHOICES)
unit = models.CharField(maxlength=6,
/r/djangolearning
https://redd.it/12vjqp8
Reddit
r/djangolearning on Reddit: Display information from another model in another admin model
Posted by u/HeadlineINeed - 2 votes and 2 comments
Sunday Daily Thread: What's everyone working on this week?
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/12vod9k
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/12vod9k
Reddit
r/Python on Reddit: Sunday Daily Thread: What's everyone working on this week?
Posted by u/Im__Joseph - 1 vote and 1 comment
This media is not supported in your browser
VIEW IN TELEGRAM
[P] I built a tool that auto-generates scrapers for any website with GPT
https://redd.it/12v0vda
@pythondaily
https://redd.it/12v0vda
@pythondaily
Thought you might like my Todoist dashboard
Hello,
Long time lurker.
I'm a huge fan of Todoist and use it every day for work. One feature that I felt was missing though, was a nicely laid out, clean dashboard which would just show my tasks for that day.
So, I built one!
Originally it was just for personal use, but a few others at work liked it and wanted access, so I've made it available for free.
This is the first release, and I'm not a professional coder, so I'm sure there will be some bugs, but I'd appreciate any feedback and hope some might get some use from it.
https://www.today.ninja
Thanks,
/r/flask
https://redd.it/12vp3id
Hello,
Long time lurker.
I'm a huge fan of Todoist and use it every day for work. One feature that I felt was missing though, was a nicely laid out, clean dashboard which would just show my tasks for that day.
So, I built one!
Originally it was just for personal use, but a few others at work liked it and wanted access, so I've made it available for free.
This is the first release, and I'm not a professional coder, so I'm sure there will be some bugs, but I'd appreciate any feedback and hope some might get some use from it.
https://www.today.ninja
Thanks,
/r/flask
https://redd.it/12vp3id
Reddit
r/flask on Reddit: Thought you might like my Todoist dashboard
Posted by u/amateur-dev-dave - 1 vote and no comments
AttributeError with Psycopg3 vs Psycopg2
# Anyone having issues using psycopg 3.1.8 on Django 4.2?
On Psycopg2 (psycopg2==2.9.6), everything works fine.
On Psycopg3 (psycopg==3.1.8), somethings work fine.
* I can make migrations
* I can CRUD from the shell
* **However I can not connect to the server**
​
Traceback (most recent call last):
File "/home/username/server/web_app/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/utils/deprecation.py", line 133, in __call__
response = self.process_request(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
request.site = get_current_site(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/shortcuts.py", line 16, in get_current_site
return Site.objects.get_current(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/models.py", line 59, in get_current
return self._get_site_by_id(site_id)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/models.py", line 30, in _get_site_by_id
site = self.get(pk=site_id)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/db/models/query.py", line
/r/django
https://redd.it/12vp8j9
# Anyone having issues using psycopg 3.1.8 on Django 4.2?
On Psycopg2 (psycopg2==2.9.6), everything works fine.
On Psycopg3 (psycopg==3.1.8), somethings work fine.
* I can make migrations
* I can CRUD from the shell
* **However I can not connect to the server**
​
Traceback (most recent call last):
File "/home/username/server/web_app/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/utils/deprecation.py", line 133, in __call__
response = self.process_request(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
request.site = get_current_site(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/shortcuts.py", line 16, in get_current_site
return Site.objects.get_current(request)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/models.py", line 59, in get_current
return self._get_site_by_id(site_id)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/contrib/sites/models.py", line 30, in _get_site_by_id
site = self.get(pk=site_id)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/username/server/web_app/lib/python3.10/site-packages/django/db/models/query.py", line
/r/django
https://redd.it/12vp8j9
Reddit
r/django on Reddit: AttributeError with Psycopg3 vs Psycopg2
Posted by u/jpegger85 - 6 votes and no comments
CustomTkinter is an easy to use desktop UI library based on Tkinter
https://customtkinter.tomschimansky.com
/r/Python
https://redd.it/12v9p1h
https://customtkinter.tomschimansky.com
/r/Python
https://redd.it/12v9p1h
Tomschimansky
Official Documentation And Tutorial | CustomTkinter
CustomTkinter is a python desktop UI-library based on Tkinter, which provides modern looking and fully customizable widgets.
Form data not saving to database
https://stackoverflow.com/questions/76082658/django-contact-form-data-not-being-saved
/r/djangolearning
https://redd.it/12vw020
https://stackoverflow.com/questions/76082658/django-contact-form-data-not-being-saved
/r/djangolearning
https://redd.it/12vw020
Stack Overflow
django Contact Form data not being saved
I am building a website for my brother and it needs a contact form, the HTML template had one pre built so i custom build a model form based off what was included in the template, so far it all wor...
I've written a tutorial on how to use ChatGPT (GPT3) over your own documents
https://www.reaminated.com/run-chatgpt-style-questions-over-your-own-files-using-the-openai-api-and-langchain
/r/Python
https://redd.it/12vq8mm
https://www.reaminated.com/run-chatgpt-style-questions-over-your-own-files-using-the-openai-api-and-langchain
/r/Python
https://redd.it/12vq8mm
Reaminated's Blog
Run ChatGPT-Style Questions Over Your Own Files
ChatGPT No Longer Just For The Web - Query Your Own Files!
What is difference between
/r/flask
https://redd.it/12vznkf
redirect_url, login_url and authorized_url in flask dance GitHub provider?/r/flask
https://redd.it/12vznkf
Reddit
r/flask on Reddit: What is difference between `redirect_url`, `login_url` and `authorized_url` in flask dance GitHub provider?
Posted by u/harkishan01 - 5 votes and 1 comment