Matin
Better if you just share the errors
I've got forbidden (origin checking failed - does not match any trusted origins.) but it had nothing to do with the version.
Sᵤdᵢₚ'ₛ Wₒᵣₗd
One question please can anybody help me to deploy flask project please
Nima
I've got forbidden (origin checking failed - does not match any trusted origins.) but it had nothing to do with the version.
It's not related to your Django version You're getting this error cuz your connection is not secure(check this out on the top of the screen in Google on left I used to get this error when searching the website with https address and also before signing in my project in google
Nima
By doing exactly what
Trying to access the forms that use csrf token
Matin
these are my settings ( the app is an internal tool, therefore the host is in local network) USE_X_FORWARDED_HOST = True # https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") # https://docs.djangoproject.com/en/dev/ref/settings/#secure-ssl-redirect SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=False) # https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-secure SESSION_COOKIE_SECURE = True # https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-name SESSION_COOKIE_NAME = "__Secure-sessionid" SESSION_COOKIE_SAMESITE = "None" # https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure CSRF_COOKIE_SECURE = True # https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-name CSRF_COOKIE_NAME = "__Secure-csrftoken" CSRF_COOKIE_SAMESITE = "None" CSRF_TRUSTED_ORIGINS = env.list( "CSRF_TRUSTED_ORIGINS", default=["https://192.168.1.109"], )
Kartik
When i strt my server it is showing the error not found The requested resource was not found on this server
Mcjatelo
Hello I want to start learning Django ,kindly can I get a kickstart documentation
Koen de
Hello I want to start learning Django ,kindly can I get a kickstart documentation
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Max
Hello everyone! I have a silly question: i want to organise key value storage without deploying separate container (Redis/memcache etc.) I tried using localmemcache as a substitute, but that was a silly idea because of a lifetime of an entity. Is there another way to organise data so that it can be accessed from any part of my Django app?
Abedin
Hey guys Im new to Django but i have some background in machine learning with python I actually want to start learning Django and have no idea how to start or what course is more useful for me I would really appreciate it if you guys could help me find a course to start
Doragonsureiyā
WOLFxASSASSIN
I tried integrating ckeditor to my django project It worked fine in Development mode But when I pushed it to production, it didn't work I have made installed ckeditor 5, Made changes in settings.py ( under installed apps and added ckeditor conifgs) Then Made changes in models.py
Xiao
sorry
Xiao
Hi everyone, I have a question about managing a project with Django in a team setting. We know that for database management in Django, we should use the models. However, some of my colleagues, who aren't familiar with Django, say they want to directly manipulate the database, like SQL Server or PostgreSQL, outside of Django, which is beyond my control. I'm not sure if this will cause issues with Django later on due to incompatibilities. In short, my question is this: let's say we have one team responsible for database management and another team for Django and web development. If at any point we need to make changes to the database, such as: Renaming a column Adding or removing columns Managing data Even changing data types, etc. What are the best practices for handling this? What steps should we take? I don't know much about this, but I feel it's easier with Django. However, if changes are made outside of Django's control, is there any way to make Django adapt to these changes and remain compatible? Can we configure Django to update itself to handle these external changes?
Xiao
Yes it will cause many issues. Team should agree on what to use you can't choose to use django and eveyone else not using it.
Can you suggest a few good methods that still allow us to use Django’s features, including the admin panel, forms, etc.?
Xiao
why!?
Davi3
Hi everyone, I'd like to ask a question on a django setup I have this on my settings.py # DATABASES = { # 'default': env.db(default="postgresql://postgres:postgres@127.0.0.1:5433/customer_orders_db") # } DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': env('POSTGRES_DB'), 'USER': env('POSTGRES_USER'), 'PASSWORD': env('POSTGRES_PASSWORD'), 'HOST': env('POSTGRES_HOST', default='localhost'), 'PORT': env('POSTGRES_PORT', default='5432'), } } On running this via docker and running tests the former results in an error due to lack of connection to the database how can I resolve this
Charly
why!?
Because it is insane to work on an envorionment when everyone makes changes without a consensus on a database. Your tables may not be even well designed to be used by django, for example
Xiao
Because it is insane to work on an envorionment when everyone makes changes without a consensus on a database. Your tables may not be even well designed to be used by django, for example
How do you suggest we work as a team so that both the database team can manage it and our group that works with Django can also be involved?
Xiao
I already answered that
I meant what approach should we take? Is there really no way to do this?
Xiao
Consensus, it is not a technicall issue
So it's like we eliminate the database management team, and they just give us the new design, and we implement it?
Xiao
Or they are in charge of the database and you don't use an ORM
If, for example, we use raw SQL, we won't have access to the admin panel and forms, right? In this case, wouldn't it be better to create a model for things like the contact form and admin panel as much as possible, and use SQL for managing other tasks? Is this method not recommended either?
Xiao
if you use just raw SQL then maybe django doesn't make sense
What if we use a combination of both? That is, raw SQL with models to utilize Django's features?
Xiao
sounds terrible
IDK! This was the idea from the Django team in the other group!
Charly
IDK! This was the idea from the Django team in the other group!
dude, thats a desicvion you and your team needs to make
Charly
for me it sounds terrible, use django as intended or don't use it, thats my suggestion
Davi3
by providing the env vars with the right values
How about the env.db as I saw an error indicating the django application running on docker via this works but the latter doesn't as host isn't defined as 127.0.0.1 but 'localhost' sorry if this seems a bit of an amateur question
Siddhi
Can anyone guide me for creating a simple project using linting, linting tools and sonarlint in Django???? I tried to search for resources but i am unable to get on YouTube.
Kasem
Hello everyone, In my project I have 3 actors (super admin,store owner, customer (normal user)) I want to implement user registration I have two choices: 1. Make super Admin create account for store owner without allow super admin write password instead that system will send link to store owner to set his password and this link is valid for one time. Or 2. Store owner can create his account with all required info and super admin cannot create accout for store owner. Which approach is better and why(Django rest framework)?
Ha 💙
How can I revoke access token by logging out?
Marco dev
I'm having problems with memory overflow, when the system starts it gradually consumes more and more memory until it crashes the web server process.
Marco dev
Marco dev
My only guess is that the logs are slowly consuming memory, but that seems like such a trivial thing.
Deepak
Can anyone guide me for creating a simple project using linting, linting tools and sonarlint in Django???? I tried to search for resources but i am unable to get on YouTube.
You won't be able to use sonar lint without installing sonarqube, you will have to use key to connect to vs code
KAKASHI
Hello friends Where can I get resource of a blog page file or code just a good blog page
Khaled
My only guess is that the logs are slowly consuming memory, but that seems like such a trivial thing.
this is really scary, you need to check your code for any potential memory leaks to determine where this problem happen. check this and the part 1 from it: https://www.gingerlime.com/2011/django-memory-leaks-part-ii/
🏅♐Mark
I have a question
🏅♐Mark
What things need to know a python django developer?
🏅♐Mark
Hello friends Where can I get resource of a blog page file or code just a good blog page
You get free templates for a blog in themeforest,themewagon websites
Charly
🏅♐Mark
To be able to develop Django apps
I mean a python django backend developer need to know html,css, javascript well? Or need to focus only on database,api,docker etc?
Kasem
Hello everyone, In my project I have 3 actors (super admin,store owner, customer (normal user)) I want to implement user registration I have two choices: 1. Make super Admin create account for store owner without allow super admin write password instead that system will send link to store owner to set his password and this link is valid for one time. Or 2. Store owner can create his account with all required info and super admin cannot create accout for store owner. Which approach is better and why(Django rest framework)?
Yosefua
How you start and configure your django project? * check that python is installed * always create a project level virtual environment * activate your virtual environment * install Django * check the installation packages using pip list * now create your Django project "django-admin startproject projectname" * finally run your project "py manage.py runserver"
Charly
What's the problem?
No problem at all
Emre
Is there any good documentation or tutorials for django admin template customization i mean not just listing fields also includes overriding templates of admin