Doragonsureiyā
As iam getting a POST request iam losing the variables from GET request
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev
droid
you need to add some conditions in your views.py
Iam checking whether it is a get request or post request using request.method
Anonymous
Firstly you need to post data into database using post method
Anonymous
Can i DM you sir?
We can chat here only
droid
Oh ok
Anonymous
Iam checking whether it is a get request or post request using request.method
Firstly you need to post data into database using post method.
droid
But i will getting the GET request first
droid
Is there a way to save those values
Anonymous
use post method to save values in database. Then use get method to retrive same
droid
And then use it again when the post request is given from the form
Anonymous
Hi everybody else 👋 Is there anyone who used .dockerignore with django projcet?
Anonymous
please use sequence post first and then get method
Anonymous
My values are from URL not from DB
okay. Then you should use get method
droid
Thank you
Anonymous
the files are not being ignored
I am checking via docker-compose run —rm <service-name> sh -c "ls -la /home/user/<project name>"
sheikh
How to create thumbil of video in django?
Doragonsureiyā
How to create thumbil of video in django?
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 firsts results
Muflone
Code, strings, comments, commit messages, readme and instructions included
Egor
Hi! Could you help me? What kind of exceptions do I need to use when I use Model.objects.create? What kind of errors I can get?
Ghorz
e will catch the exception
Egor
Thanks. But as I know it's not correct way to use except Exception, right?
Ghorz
Thanks. But as I know it's not correct way to use except Exception, right?
It's basic but it will return what ever exception was raised
Ghorz
Like unique constraints
Ghorz
Or invalid data for field
Egor
Understood. Thanks
Lelouch
Wanna make chat in site Where to find it help
ᐯᑌᏞᏦᗩᑎ📈
could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
ᐯᑌᏞᏦᗩᑎ📈
how to solve this problem
Mirco
how to solve this problem
You don't have you db up and running
ᐯᑌᏞᏦᗩᑎ📈
what should i do?
Mirco
Start your database ?
ᐯᑌᏞᏦᗩᑎ📈
yea
Mirco
We don't know what's settings u r using
Mirco
So we don't know what db u are using
ᐯᑌᏞᏦᗩᑎ📈
i am using postgres
Mirco
So start postgres
Mirco
And then runserver
ᐯᑌᏞᏦᗩᑎ📈
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'youtube', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '5432', } }
ᐯᑌᏞᏦᗩᑎ📈
could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
George
check the service is online
George
Check that you can psql into your database
Mirco
So I think you can check your db with psql
Hari
Django translation is not working properly can any one help here
Hari
When translated some of them are displayed incorrectly
Hari
Any body know this
Anonymous
{% widthratio 87 255 1 %} this is django template tag code which divide 87/255 how i write 87/255*100 inside template tag and show result
Anonymous
Hello) I connected all the static files, but still the beaten styles when going to the page home.html) Help solve the problem. code on github
Zaryab
Any one who integrated JavaScript with Django
Toni
any way to use deleteview without confirmation template?
pino@mastrobirraio ~$
any way to use deleteview without confirmation template?
https://stackoverflow.com/questions/17475324/django-deleteview-without-confirmation-template
Anonymous
hello... we use {% load static %} in html form for call static files... well...i want to use my custom name instead of 'static' for example: {% load my_love_static_file %} how can i do this?
Anonymous
Why doesn't static file work? I connected everything, but still do not work
Muflone
almost every django-newbie doesn't understand how static files work, I wonder why
Muflone
Why doesn't static file work? I connected everything, but still do not work
static files ARE NOT SERVED by django, in any way. django is not used for static files when you go in production (debug=False). you have to configure your webserver to serve static files, like you do with a static site, with no django
Anonymous
ooohhhhhh...right
Anonymous
sorry
Muflone
🙄
Anonymous
i use this: {% load static "whatever" %}
Anonymous
and in html form : <link rel="stylesheet" href="{% whatever 'css/all.css' %}">