Mirco
Why is it difficult to upload django app online
It's not difficult, not easy for beginners but not so difficult Especially nowadays with PaaS
Dirn
Why is it difficult to upload django app online
Render makes deployment very easy, deploys straight from your GitHub repo
Arsham
Show code
Thanks, I fixed it
Samuel
Render makes deployment very easy, deploys straight from your GitHub repo
Please do you have any straight forward tutorial that can help out I am using Mysql database with the django app
S
Hi, I am working on django blog post the problem is that some pages are loading slow specially when creating long blogs and adding image to the blog. I have tried using django debug toolbar. I think the problem is my network can I one help me optimize it. The blog is hosted on digital ocean app platform url is seahorse-app-m65iq.ondigitalocean.app
Vic
I have simple question… If I filter objects with select related, save it to variable and then I use get for this saved var, is it two requests to db? processed_orders = Order.objects.filter().select_related() order_instance = processed_orders.get(id=lk_id)
S
Is there a security risk or not best practice.
S
What the load speed slow or fast.
S
Thank you. I will add that feature.
Dirn
Please do you have any straight forward tutorial that can help out I am using Mysql database with the django app
I can't find the tutorial I used when I worked with it but if you check YouTube, you should find one easily
Dirn
What are the benefits of using forms
Makes thing easier, just like using django's ORM instead of sql queries I personally don't use Django forms though
S
Does it work fine locally?
Yes I had a network problem and I thought I needed to optimize the loading speed. I removed the blog from digital ocean.
Hamza-12
I want to be a part of a django project team. Could any one join me in the group?
Balde
what is the best host for Django to host several applications, as cheaply as possible
Husen
[2024-04-04 18:13:54,394: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [WinError 10061] Hello everybody. when i use redis with celery i get this error what should i do?
Eric
[2024-04-04 18:13:54,394: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [WinError 10061] Hello everybody. when i use redis with celery i get this error what should i do?
amqp tells me celery is trying to connect to its RabbitMQ, celery defaults to this broker if nothing is configured. Check your settings to make sure you are pointing to a redis broker... or share that section of your settings with us (use a pastebin)
Eric
but i gave celery_broker and celery_result_backend
Share the actual lines of code in your settings and we may be able to assist
Husen
CELERY_BROKER_URL = "redis://localhost:6379" CELERY_RESULT_BACKEND = "redis://localhost:6379"
Ankit Sharma
Static files not being loaded on render
Ankit Sharma
It works on a local host but
Alex
Static files not being loaded on render
add static configuration in nginx or use whitenoise
NoBoDy
Hi everyone 👋 i have a code similar to this : from django.db import transaction from django.db.models import F from celery import shared_task @shared_task def my_celery_task(): with transaction.atomic(): my_instance = MyModel.objects.select_for_update().get(pk=1) but when i run i land to this error: django.db.transaction.TransactionManagementError: select_for_update cannot be used outside of a transaction.
AH
Are you sure your code as the .get() at the end?
NoBoDy
Are you sure your code as the .get() at the end?
@app.task def get_transactions_to_withdraw(): with transaction.atomic(): transactions = ( Transaction.objects.select_for_update() .filter( draw_time__lte=datetime.now(UTC), status=TRANSACTION_STATUS_PENDING, ) .values("uuid", "amount") )
NoBoDy
what next happens to the transactions variable?
oh shoot, i logged outside of transaction 🫠
NoBoDy
thank u all 🍻
Saah
I'm currently working on a website using Django where users can sign up. To make the sign-up process easier, I divided it into multiple steps, each step collecting specific information from the user. These steps are called "register_step1", "register_step2", "register_step3", and "register_step4". I'm using session storage to pass the user's information from one step to the next. So, when they complete one step, their data is stored temporarily until they finish the entire process. At the end of the registration process, I want to show the user a summary of all the information they provided on a page called "registration_summary". However, when I reach that page, nothing is being displayed. I'm not sure why the information isn't showing up on the summary page. Can you help me troubleshoot this issue?
Nishanth Siraj
There might be a problem in storing using session, may be wrong syntax
.
Guys, who knows about one signal, you can send me a normal docs, I didn’t find it on the internet, I don’t understand, someone used it
.
One signal push notification for Django
Fais
Please suggest any best tutorial for learning django-restframework
Rose
User FastGod has 1/3 warnings; be careful! Reason: offtopic
Kenneth
Am having issues deploying to vercel any alternative for a free hosting?
Reignbow
Is django over? I can't find enough job of django on career sites.
ㅤMeraj
Is django over? I can't find enough job of django on career sites.
https://www.geeksforgeeks.org/future-of-django/ Pls read this 🙏
Husen
Hello everybody. when I'm using celery in django If I do task.celery_task.delay() it doesn't start celery. but if I don't write delay() it works. why is this happening?
Eric
Celery helps to perform django tasks asynchronous. RabbitMQ is a message broker if I am correct. For my projects I use Docker and it works.
You can choose to either use rabbitmq or redis as your celery broker and your celery results backend. Even though rabbitmq is the "default".. A lot of people like to choose redis. You were responding to my comment on another user who's having issues getting his celery to talk to his redis.
Test
https://medium.com/@dorianszafranski17/django-django-allauth-recovery-password-email-system-79be5a5721a8 I was going through this article, under production, do we also expose user email passwrod?
Benso
Who knows how to configure a django project to use Postgresql as its default database.
MarKo
Who knows how to configure a django project to use Postgresql as its default database.
you just to have to change the parameters in the settings.py of your project
MarKo
the parameters should include all your db connections string values and you will also import the database driver psycopg2 from the psycopg2 module
Eric
Who knows how to configure a django project to use Postgresql as its default database.
Things changed recently, I think nowadays you need a .pgpass and a pg_service.conf somewhere that your project can access. Then when invoking Django to start you need $PGSERVICEFILE defined in your environment (this environment variable is the path to your .pg_service.conf file). Atleast that's how I do it now.
Eric
Who knows how to configure a django project to use Postgresql as its default database.
https://docs.djangoproject.com/en/5.0/ref/databases/#postgresql-connection-settings
Akash
I am trying to send StreamingHttpResponse from view to Django HTML. How do I use async in the function?
ManDo
Hi. I am trying to send an image to another service, but the destination service raised an error "Unsupported Media Type". How can I send my image to another server? this is my code: image = input_data.validated_data['image'] save_image = requests.put(settings.IMAGE_STORAGE_HOST, headers={}, data=image)
KartiK
hey i just learned django with RF from mosh course now i am want to build a ecommerce website from whatever i learned i want to ask which yt tutorial should i follow or build it on my own bc its backend is so vast i can do it on my own thhere will be so many things to add which is not easy for newbies like me suggest pls
𝓚!4𝓝
hey i just learned django with RF from mosh course now i am want to build a ecommerce website from whatever i learned i want to ask which yt tutorial should i follow or build it on my own bc its backend is so vast i can do it on my own thhere will be so many things to add which is not easy for newbies like me suggest pls
Having Database knowledge and knowing how do you want to design it is important design a path for your self to follow and divide every task into smaller sections so it'll get easier when you encounter a problem and want to solve it you can design flowcharts for making it clear there are some yt tutorials but mostly you won't need them
Anonymous
I ran a html css code on local server port 4000 it ran successfully, but same code while running on port 8000 gives css issue. Why is this happening
Qwerty
did not appear
try to add the include parameter to the Celery instance and enter the path to the task in the list. app = Celery(..., include=[' task_path'])
Rose
User Rohit has 1/3 warnings; be careful! Reason: rule #1: speak English
Amir.M
Hello, I use Django's auth views for login and password change, what should I do if I want to replace my own forms with the default forms?
ȺʍìɾⱮօհąʍʍąժ
Hello, I use Django's auth views for login and password change, what should I do if I want to replace my own forms with the default forms?
https://stackoverflow.com/questions/55369645/how-to-customize-default-auth-login-form-in-django
ȺʍìɾⱮօհąʍʍąժ
Is it possible to set the form for other views like this?
It should be possible 🚶‍♂ You just need to search for it on google (like me)
Rose
User Bacanero has 2/3 warnings; be careful! Reason: rule #1: speak English
.
Hello guys, everyone who has used django push notification. Who has the latest documentation or github? Thank you!!!
Rose
User L¿<> has 1/3 warnings; be careful! Reason: useless message
alex
Hi. I need a bit of help with my django project. Can not make the edit and delete button to work for a booking website. Thanks in advance