Абдулла
view example
Rahat
Please tell me how to implement subscription part rezorpay in django rest framework
Абдулла
This isn't an authentication view, or did i not understand ur question??
system automatically send sql query for request.user
Абдулла
yes
Абдулла
Is that an issue?
I need to optimize this query
hehehehahaha
I need google login please help how to implement that?
Абдулла
Remove unused User model fields
Doragonsureiyā
I need google login please help how to implement that?
No one can help you until you explain your difficulties.
hehehehahaha
django-allauth
Thank you 😊
Amir
Hey guys I defined a location for api inside nginx But when I want to upload a file to the site, there is an error Reason: CORS header 'Access-Control-Allow-Origin' missing gives While I add_header 'Access-Control-Allow-Origin' '*'; I added it in nginx And that there are no problems with other api addresses on the site Where do you think the problem is?
Divya
{% for object in posts %} <article class="content-section1" > <div class="media-body1"> <div class="img-cont1"> {% if object.image %} <img src="{{object.image.url}}" /> {% endif%} </div> <h2> <a href="{% url 'post-detail' object.id %}" class="index-title11" >{{object.title}}</a> <a href="{% url 'post-detail' object.id %}" class="index-content" >{{object.content|safe|truncatewords:15|cut:"\n"}}</a> <a href="{% url 'post-detail' object.id %}" class="index-content-date">{{object.datepublished}}</a> </h2></div></article> {% endfor %}
Divya
this code is not showing any output
Divya
can anyone help ?
Jaime
Make sure you are sending the posts in context
Divya
class PostDetailView(DetailView): model = Post
Divya
this is views.py for this page
Amit
Anyone uses drf api with Kong api gateway I'm unable to configure Kong api gateway
Amit
If anyone has solution please let me know.
Amit
While configuring Kong api in my local ubantu machine i got the error Curl:(7)Failed to connect to localhost port 8001: Connection refused.
Alexey
class PostDetailView(DetailView): model = Post
look at get_context_data default is 'object' or model name u have to overide get context if u want to get from posts var
ƤŘΔΜØĐ
Can anyone provide me django interview questions for experienced candidates.
Jaime
class PostDetailView(DetailView): model = Post
If you want to show a list of objects, don't use detailview, use listview.
Mayank
In api view I have written delete method backend is working But when I clicked on delete button, showing get method is not allowed
Eric
In api view I have written delete method backend is working But when I clicked on delete button, showing get method is not allowed
Either change your API endpoint to accept both GET and DELETE http methods, or call the API with using the DELETE method when the button is clicked: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
unknown
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url: /abhi (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D24B3FAA90>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
unknown
any one can please tell me this solution
Devendra
attributeerror: 'wsgirequest' object has no attribute 'is_ajax'
Charly
4
is_ajax is deprecated
jack
Deprecated in 3.1 and removed in 4
jack
attributeerror: 'wsgirequest' object has no attribute 'is_ajax'
Seems you are using is_ajax of wsgi. Instead, you can use the is_ajax property of the HttpRequest object to check if the request is an AJAX request or not.
Anonymous
Hello, I have a problem and I can't solve it. There is a login form for the site, when a user enters the site, he first enters his login, and then the template changes to a password field I need Gmail, first mail and then password, I don’t understand how to implement this, please help
Anonymous
You want to log with email ?
no difference, I want to understand how it works, how to implement such a login
Vorke
Hi guys, how long does the django admin login session last?
cj
Hi guys, how long does the django admin login session last?
by default, 1209600 seconds... but you can change it in your settings file using SESSION_COOKIE_AGE value... also you can use SESSION_EXPIRE_AT_BROWSER_CLOSE if you want the session to expire when the browser is closed... read more here: https://docs.djangoproject.com/en/dev/ref/settings/#sessions
cj
also it doesn't matter if it's an admin session or a normal user session, it's just a session
Chayeb
no difference, I want to understand how it works, how to implement such a login
Go to Django documentation and search for costum blackened authentication
Harry gorilla
GET /admin/login/?next=/admin/ HTTP/1.1" 500 59 Not Found: /favicon.ico [03/Apr/2023 22:10:20,977] - Broken pipe from ('127.0.0.1', 62781) Am getting this error when trying to access the admin page in django, What could be causing this error?
Harry gorilla
Charly
What do you mean?
Do you know whats a traceback?
Charly
Nope
hmm maybe you need to revisit your basic python before working on django But Imean there should be a a python error in the logs
Charly
Yes, it's the one i have send i think so
No, a python error, search on google whats a python traceback to understand what I'm referring to
Harry gorilla
No, a python error, search on google whats a python traceback to understand what I'm referring to
So where will i see those errors? I think the errors are always displayed after running the django server?
Mr.
https://stackoverflow.com/questions/75911862/why-django-form-is-submitted-but-the-valued-is-null-in-the-database
Arsalan
Hey Every Body I Have Problem So My Problem Is that when i want to use celery with django in ubuntu server it return this error No module named 'None' how can I solve this?
Javohir Hasanov
is the 'None' imported in your code?
Javohir Hasanov
like 'import None' or other
Javohir Hasanov
please help me!
i think you have to write 'pip install None' on powershell or cmd
Arsalan
i think you have to write 'pip install None' on powershell or cmd
Yes I have installed this but also have the same error
Javohir Hasanov
Javohir Hasanov
try it
Arsalan
try it
in my tasks file?
Javohir Hasanov
Arsalan
Javohir Hasanov
ok
If it is error again, review this https://stackoverflow.com/questions/43541852/importerror-no-module-named-none
Вероника
Hi) I need help with migrations Django. Migration is not completed. Идет выполнение: manage.py makemigrations >>> or Идет выполнение: manage.py migrate >>> This is all that is displayed in the console.
chowmin
Use python manage.py makemigrations