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
Or he could not enter that page when he had not done something
Hossein
Noddy
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ā
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ā
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
Seth
㊝┇ᴋᴀᴋᴀʀᴏᴛᴏㅤ☁︎
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?
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
Mirco
_
_
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
?
Anonymous
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
𝔽ɛ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
Muflone
Andrew
Andrew
Is anyone knows how to use django-parler
Andrew
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
Anonymous
But went storing data in project folder its also not a good approach
Anonymous
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?
Mirco
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)
}
}
㊝┇ᴋᴀᴋᴀʀᴏᴛᴏㅤ☁︎
Anonymous
Nithin
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 ?
Jitxs
anyone has a preferred or commonly used platform for hosting django website for free ?
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
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