Doragonsureiyā
How to do that
Looks like you need to read the documentation of it
Hossein
hello . i want learn how to set cookie in django and sessions how i can set cookie or use sessions?
Hossein
hello . i want learn how to set cookie in django and sessions how i can set cookie or use sessions?
I want when the user enters the site and exits and opens her browser again, she remains logged in the same way.
Hossein
Or he could not enter that page when he had not done something
Doragonsureiyā
hello . i want learn how to set cookie in django and sessions how i can set cookie or use sessions?
These single steps will help you a lot: Step 1️⃣: Open a browser Step 2️⃣: Write down https://google.com or https://duck.com and press Enter Step 3️⃣: In the search box, write down the same words you asked here Step 4️⃣: Read the first results
Noddy
SESSION_COOKIE_AGE = 365 * 24 * 60 # A YEAR
Noddy
But its not recommended
Zada
I can not deploy the Django project on hosting can you help
Zada
How should I proceed
Doragonsureiyā
I can not deploy the Django project on hosting can you help
No one can help you until you explain your difficulties.
Zada
What Im going to do after I deploy it is to get the project up and running but how
Zada
sorry ım use translate
Doragonsureiyā
What Im going to do after I deploy it is to get the project up and running but how
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
Seth
hello all prgs! problem with starting gunicorn as service! root@ido-m:/environments# service gunicorn restart root@ido-m:/environments# service gunicorn status ● gunicorn.service - gunicorn daemon Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2023-09-06 11:35:14 MSK; 5s ago TriggeredBy: ● gunicorn.socket Main PID: 398710 (python3) Status: "Gunicorn arbiter booted" Tasks: 4 (limit: 14264) Memory: 85.4M CGroup: /system.slice/gunicorn.service ├─398710 /environments/my_env/bin/python3 /environments/my_env/bin/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock apiproject.wsgi:application But socket file no exist!
Seth
when i try to run from shell as root - all work like a charm
Flyest
i am currently having python3.8 install on my ubuntu machine. but i am creating this django project which i want to use python3.10 for the project. I have tried using this _________________________ - virtualenv -p /usr/bin/python3.10 venv - source venv/bin/activate but any time i try installing the packages in the requirements i get an error. ImportError: cannot import name 'html5lib' from 'pip._vendor' can someone please help me
Seth
Use pip not pip3.10 and etc
㊝┇ᴋᴀᴋᴀʀᴏᴛᴏㅤ☁︎
Hello, I have issue in getting auto suggestions while searching, here is the code : https://dpaste.org/HNayg and html in this https://dpaste.org/aZfg6 can any one help out in this.i am getting the suggestions as object if am giving any particular name also am getting others which not related to the entered query
_
There is a function to build a URL depending on whether it's running locally, in Dev, on stage, or in production. How can I unit test this function in Django using pytest?
_
A function is used to find if code is running on localhost, staging, production. The logic for function is a custom one. Not found elsewhere
Mirco
A function is used to find if code is running on localhost, staging, production. The logic for function is a custom one. Not found elsewhere
It's clear, but if you don't share the function code we cannot help you We don't have magic ball
_
It's clear, but if you don't share the function code we cannot help you We don't have magic ball
it's basically a if else written based on os.environ.get("ENVIRONMENT") in the settings.py file.
Mirco
it's basically a if else written based on os.environ.get("ENVIRONMENT") in the settings.py file.
So inside the test you just have to set that env var with the different values and assert the expected result
Tamerlan
How now is important install apturl for my project because i use ubuntu in digitialocean and i cannot install this packeg for my virtualenviroment
Vladyslav
Hi Somebody did blog on django, but with visual editor for posts? I going to create website, but for get traffic from google, want to post some articles, and thinking, make blog on django or add subdomain and make it on WordPress. Want to try develop it on Django, it's not so hard, but what about visual editor?
Zada
Is it possible to run my Django project on a web host that supports Python?
Zada
?
Vaibhav
Hi, is there a change in django object creation behaviour over the past few version? Earlier whenever we created a object using .create method, not null fields used to raise error but not even though I haven't passed default as empty string, it creates an object with empty string eg of snippet https://dpaste.org/tTQGK
Vaibhav
my hunch is somewhere they changes the default from None to something else but can't find it
Zada
Yes
how
𝔽ɛx-ꜱɪɴ
How to configure django braces?
Алексей
Hi, what about Django for python 4?
WizzesReviews
Hi how do I look for a job on Django developer
Лиза
Are there any ways to exchange data between different celery nodes from different docker-compose environments? When I get to the bash of fastapi container I see registered tasks of fastapi and django, but when I try to send data using registered name I get an error. When I’m logging celery from fastapi task I see only fastapi registered tasks. bash fastapi: root@2f042fcc8c5f:/src# celery -A core.celery_app inspect registered -> celery@da4a11a3b5d6: OK * apps.devices.tasks.update_last_response * apps.licenses.tasks.consume_messages (django’s needed task) -> celery@95a2f2625362: OK * applications.files.tasks.kek * applications.files.tasks.send_data_to_django (Im sending from here — fastapi)
Nithin
Hello guys I am studing django it will useful to fresher or not to get a job
Flyest
Hi how do I look for a job on Django developer
you can check out linkedIn .. search for jobs related to django based on your level
Andrew
Is anyone knows how to use django-parler
Charly
Is anyone knows how to use django-parler
https://django-parler.readthedocs.io/en/stable/
Doragonsureiyā
What are you talking about?
Tamerlan
ERROR: Could not find a version that satisfies the requirement Brlapi (from versions: none) ERROR: No matching distribution found for Brlapi
Tamerlan
When i installed this andanother packages i am geting this eror, yes i now these packages is ubuntu packages not pip. My question is importand install this packages for deploy or not. In local it is work well
Anonymous
Hi, anyone who can tell how to store django image field directly to database not in project file
Charly
Hi, anyone who can tell how to store django image field directly to database not in project file
That's a bad idea. Your database will grow more than usual and it will be hard to manage.
Anonymous
But went storing data in project folder its also not a good approach
Charly
But went storing data in project folder its also not a good approach
its a good approach beacue ya make your webserver and not django to serve, or you can use an external object storage like S3
Charly
Can explain in steps hoe to do with external object storage
https://testdriven.io/blog/storing-django-static-and-media-files-on-amazon-s3/
Anonymous
Thanks
Satyam
Hey, I am using djangorestframework and request.data is returning value in the querydict format instead of direct JSON. How to get only JSON?
Kumar Shreyansh
Hi, anyone who can tell how to store django image field directly to database not in project file
It's a bad idea bcos it reduces database performance which is very essential for any project
Anonymous
I have list of urls And I need iterate this url and every url has database it's works with lineary searching
Anonymous
Is it true to apply binary search
Prabhas
Can any one help how to connect with django with postgres SQL server
㊝┇ᴋᴀᴋᴀʀᴏᴛᴏㅤ☁︎
Can any one help how to connect with django with postgres SQL server
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'your_database_name', 'USER': 'your_database_user', 'PASSWORD': 'your_database_password', 'HOST': 'localhost', # If your PostgreSQL server is running locally 'PORT': '', # Leave empty to use the default PostgreSQL port (5432) } }
x-yro
Hello, I have a question how to overwrite the AdminEmailHendler so that it sends only the error itself (traceback) to the developer
Wisdom
Hello guy Please it seems that from celery.decorator import task Is deprecated in latest version of celery How can I use task now ?
Doragonsureiyā
Hello guy Please it seems that from celery.decorator import task Is deprecated in latest version of celery How can I use task now ?
These single steps will help you a lot: Step 1️⃣: Open a browser Step 2️⃣: Write down https://google.com or https://duck.com and press Enter Step 3️⃣: In the search box, write down the same words you asked here Step 4️⃣: Read the first results
Jitxs
anyone has a preferred or commonly used platform for hosting django website for free ?
Doragonsureiyā
anyone has a preferred or commonly used platform for hosting django website for free ?
Adding the word Django to your Off-Topic question doesn't magically turn it to a Django related question, so move to @PythonOfftopic group and ask there.
Carlos Eduardo
Hi every one, I need two way on list objects, one for the public views ( I am using a model manager here for a filtered queryset ) and one for the django site admin with no filtered data I have tryed to overwrite the get_queryset method on the modelAdmin but I couldnt get whats I am looking for, a Any suggest please
moses
Good day. I am having problem running Django on webserver and this is my first time. I actually bought a VPS in Hostinget, now to choose the best Operating system setup with a good web server is my big problem. I have gone through tutorials, still I am still not seeing changes. Can u please help me
Singularity Sikesh
I'm using Pisa , please help me with it or suggest something please
I am having experience in generating pdf. Using pdfkit .I have converted django template in pdf using pdfkit
Frodo
Can any one help how to connect with django with postgres SQL server
Install the appropriate psycopg2 connector, then adjust the database accordingly in the settings.py https://pypi.org/project/psycopg2/
Doragonsureiyā
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
ashu
Sorry guys for irrelevant questions but can someone really i also try Google and other platforms
ashu
how to solve this Forbidden You don't have permission to access this resource. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the reques