Anonymous
How to access logged in user in models.py
Reflex
Django gets error when deleting user
get_user_model().objects.delete_user(user)
How to delete user?
Nancy
Anybody know the solution of this error
Models is not defined
Maxim
Nancy
Import h
Doragonsureiyā
Import h
To share code or error tracebacks, use a pasting service, like:
- https://linkode.org
- https://dpaste.org
Nancy
Ok
Anonymous
k
icontains is not working. It is giving results as if contains only.
Db : mysql
Os : macbook air
Framework : drf
Ide : pycharm
Any idea why this is happening or how to solve this?
Charly
Somebody
Hey, i faced problem , that is carousel(slides feature)in bootstrap option not working in with django. anyone who can solve this problem
k
https://dpaste.org/sdrAi
k
This one is the right one. Can someone help?
Vlad
Please tell me a way to implement reviews on the site, through Google authorization. No google store
mahdi
Hello to all
How can I identify in the views whether the user is an admin or not?
gadghimuradm
Yuriy
Hi.
I have a Filefield field with a file in the admin panel.
How to make it when clicking on a link it opens in a new window?
Somebody
Somebody, [30-04-2022 11:34 PM]
Hey, i faced problem , that is carousel(slides feature)in bootstrap option not working in with django. anyone who can solve this problem , here its code https://linkode.org/#JobX5Qbs2YqafVBawza5x3.
Harry gorilla
Abdullaev
Guyz which is better gunicorn or uwsgi?
Harry gorilla
I want to put all the autogenerated media folder in my gitignore, am just wondering which name i should use to ignore such files.
Maxim
Д
Maxim
Azizbek Xushnazarov
I can't count the number of sql queries in django.
connection.queries is returning empty list.
here is my decorator:
def count_query(func):
async def wrapper(*args, **kwargs):
result = await func(*args, **kwargs)
total_queries_count = sum(len(c.queries) for c in connections.all())
print(total_queries_count)
return result
return wrapper
Ionut
Hey guys!
I am having some issues with the admin (in development on 127.0.0.1, I haven't tried yet in production): when I log in in the admin panel, whenever I make a request from the website to the API, it returns 403 (forbidden). If I logout, everything works like a charm again... What am I missing?
I would also love to know if is there a way to make the admin panel "look better"? Idk... by installing a package, or dropping some files in the "static" folder?
Abdullaev
Cabrel Tchomte
Good idea to start directly with DRF ( Django Rest Framework) ? 🤔
Doragonsureiyā
Cabrel Tchomte
With knowledge in Hello World, OOP Python of course 😅
Maxim
Cabrel Tchomte
I saw, but for backend devs. is it necessary to learn all Django ?
Maxim
Maxim
and i don't think anyone knows Django in its entirety
Cabrel Tchomte
For someone who has knowledge in python, can switch directly in DRF or not?
Maxim
Maxim
DRF is not a standalone product, you can't use it without knowing anything about Django
Cabrel Tchomte
Ok.
Maxim
you can "switch", but you have to learn Django along with DRF
Cabrel Tchomte
Ok thanks. Good received 👍
Reflex
openid is supported by django allauth,,
The question is, which of this two?
the deprecated [openid] or the preferred one [openid connect]
🤔
Leo
Leo
If django-allauth supports
Reflex
Sure?
Jb Mani
Django full movie Tamil linge sand
Rohan
Movie?
Rohan
I think he’s confusing this group with Django unchained
Rohan
rtg
¿Is the same create app, or copy a created app to the folder and add to installed_apps?
Kay
Mekdim
Guys i already have to apps in my django project and when i try to the third its not routing to the template i created i figured the all the file as i use for the second as well for the firs app
rtg
SOS:
rtg
File "/home/retegi/Documents/proyectos/webretegi/env/lib/python3.8/site-packages/django/core/servers/basehttp.py", line 49, in get_internal_wsgi_application
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: WSGI application 'webretegi.wsgi.application' could not be loaded; Error importing module.
rtg
The problem was Middleware ; )
rtg
Question: Is correct to use SqLite database for a Blog web project and administrator system? I am not sure to use SqLite or PostgreSQL. What do you think about? Thanks!
Shabbir
Anonymous
can i restrict permissions to specific methods of class only(not to whole class) in DRF
J
Hi. How can I make "created_at" be returned to the client but not accepted when the request is sent (django restframework)
class MessageSerializer(serializers.ModelSerializer):
chat_id = serializers.PrimaryKeyRelatedField(
queryset=Chat.objects.all()
)
text = serializers.CharField()
class Meta:
model = Message
fields = (
"id",
"text",
"chat_id",
"user_id",
"created_at"
Moshe
Azeez
C
Hi
C
How can wirte MySQL query in django
C
Any please help me
Leo
C
Typucm
Hi
Within our company we are using an intranet application based on django2, python2 with AD inegration. The developers left 4 years ago. I am fine to learn django latest version and enhance the application if I can have both django versions working together without negative impact on the user experience.
Is it possible having django 2 and 4 + nginx behaving as a single webapp?
Д
Д
as for the Django, I mean — if you already have a working app - what's the question?
Typucm
Thank you!
The question is related to the no negative impact on the end users. For example, the user logins to the "old app" login form and the authentication/autorization works for the new app when its url is requested.
Д
Д
the question is way too broad to answer, to be honest.
Typucm
It's one application right now