Doragonsureiyā
Hi any django developer i need help please
No one can help you until you explain your difficulties.
Naughty
Can anyone correct my Django project if I send the zip file. I can explain what is the problem too
Ivan
Hi, help me, please. how can I remove the errors that Django creates, for example, when passwords do not match during registration?
Egor
Hello everyone! I have an «el problemo» with DRF: My service has ordering system, and I want the user to be able to see only their own (it looks like localhost/api/v1/orders/<id>/) I wrote a custom permission, and in fact the user cannot view orders by id if they do not belong to him, but another question arises, how can he forbid viewing the list of all orders (localhost/api/v1/orders/) and forbid doing putch/patch /delete to yours? You only need to Read only your order, the prohibition to watch others individually, and all orders in general
Egor
Hi, help me, please. how can I remove the errors that Django creates, for example, when passwords do not match during registration?
Hi. Use django forms. Django shows incorrect fields filling by default, also you can customize them, if you want.
Abhie
Hi, I want to turn on the webcam using js and use this video in django views. How do I do this? Thanks...!!
Yaroslav
Hi guys!I have got a problem with my rest api When i use generic api view in response i get full media url (http://127.0.0.1:8000/media/albums/wallhaven-2eglj6.jpg), but when i use functional view i have got this: /media/albums/wallhaven-2eglj6.jpg
Yaroslav
How can i get in both case full url?
David H
Hi everyone I'd like to ask for a question that nobody asked me in stackoverflow
David H
I'm writing this question because I have doubts about how to implement a scenario that we had not foreseen for my django developed application. Basically what I need is a way to allow some types of users, depending on their role, could access data that is in multiple schemas, which now is managed with django-tenants. So the approach that I had thought of was to create relationships between the "tenants", which define the database schemes, and detecting which of them a certain user belongs to, to be able to query all the schemes that are related to it in a loop. In the same way, this has some drawbacks, since this solution would require a lot of additional programming and concatenating querysets or working by adding the responses of the serialized data of each queryset of the aforementioned schemas could be inefficient... So, is there a different way to reach the explained objective with a different approach? Thanks in advance. https://stackoverflow.com/questions/74586305/querying-multiple-schemas-with-django-tenants
Abhie
Webrtc
Yea I know, is there any other way to achieve this. Thnx thoug
ким
how do I make the button read? for example, I take BooleanField for the status in the models. then what next?
ким
in the view, what to write in html?
Shrey
How to use AutoField in models for auto incrementing IDs !? The below method is not working: id = models.AutoField(primary_key=True)
Abhishek
Hi guys.. Help!! I am able to launch my url as: 127.0.0.1:8000/login/ And in 127.0.0.1:8000/register/ page there is <a href="{% url 'login'%}"> Login </a> When i load this register page, i am getting error: NoReverseMatch at /register/ Reverse for 'login' not found. Can anyone help me why i am getting this please
Shrey
How to use AutoField in models for auto incrementing IDs !? The below method is not working: id = models.AutoField(primary_key=True)
Also can we pass in a different field as the foriegnkey to another model in place of ID if it is the primary key !? class Model1(models.Model): name = models.Charfield(primary_key=True) class Model2(models.Model): id = models.Charfield() fk = models.ForiegnKey(Model1, on_delete=models.CASCADE)
Hello
How can I send html template for allauth email?
Abhishek
Yes i have: path('login/', views.loginUser, name='loginUser')
milkiyd
Ok so you have to use <a href="{% url 'loginUser' %}">. It's the value of name attribute we're passing
Shrey
You need to rename the url href in html page to the name mentioned in the urls.py file
Haresh
Hii
Haresh
I need help in my project any one available?
Doragonsureiyā
I need help in my project any one available?
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Mirco
Hii
don't write in PM or u will be warned
5core | django dev
error: attempt to get argmin of an empty sequence
5core | django dev
please help me
vinay
Hi everyone, while calling custom functions in modelviewset, am mentioning decorator with details, name, method as parameter. And created router at urla.py, am getting 404 error..please let where am I missing?
𝖇𝖎𝖌𝖟𝖟𝖍
i think there is an issue with the bot if a user posts a telegram link to a message in this channel, to link his code to avoid resending it he is going to be warned
hesam
Hello friends, I create a project in cpanel, I get error 503, but the initial project is Django and without error on a shared host, where is the problem?
Neeraj
Create two-level login  1)user 2)supervisor/admin User:- user should be able to only insert data.like , customer name,cutomer address,email,number,product id ,product name. Supervisor/admin:- dashboard for how many user are login and logout  ​​​​supervisor should be able to modify and delete data whom inserted by respected user . Registration page:  i)username(can contains character,numeric,special characters) ii)firstname iii)lastname iv)email v)password/confirmpassword(character+number) vi)mobilenumber(not more than 10)
Neeraj
Actually I have to do this
David H
Maybe some sort of Pagination?
So... There isn't any package or implementation to do it in another way, no?
Matuo
Hi, guys how can start django project in where i, for e.g: django-admin startproject .
Matuo
Hi, guys how can start django project in where i, for e.g: django-admin startproject .
I don't know how can do that, only want start the project where I am
milkiyd
startproject is for creating a new Django project. After you create it use django-admin runserver in the project directory to launch the development server.
Cesar
Actually I have to do this
Then, what is your question?
Oleksii
Hello How correctly redirect to player_control view with modal parameter? player_id = 12 modal = Modal("Surprise!", player) modal.surprise = surprise return redirect( f"/player_control_{player_id}/", modal = modal ) views.py ...... def player_control( request, player_id, modal=False ):
Serkan
Hello My code is: from django.urls import path from . import views urlpatterns = [ path(" ", views.index, name = "index"), ] But I faced with ImportError: attempted relative import with no known parent package. Is there anyone who can help me ? How can i fix it ?
Smile
hello how to hide validation errors after refreshing form page? (i am using class AuthenticationForm and LoginView) if i refresh the page the errors remain UPD: solved using js
Serkan
from.views import * you can do this
is it like that ? : from django.urls import path from.views import* urlpatterns = [ path(" ", views.index, name = "index"), ] There is still the same error unfortunately
milkiyd
Hello My code is: from django.urls import path from . import views urlpatterns = [ path(" ", views.index, name = "index"), ] But I faced with ImportError: attempted relative import with no known parent package. Is there anyone who can help me ? How can i fix it ?
If you are in the project urls.py file, you have to provide the application's name. Like: from appname import views. But if you are in the app level urls.py file there should normally be any errors.
Cesar
im pretty sure when you are in prod / running via gunicorn or something like that, each call runs in a separate thread, so you should, in theory, have as many concurrent connections as workers you set. For example, gunicorn -w 4 APPNAME.wsgi -b 0.0.0.0:8000 should create 4 workers and each worker would accept connections in parallel.
Son
Hi i am registering site still i am not able to see table on admin
0x01
What does your code look like?
Son
I am working on django
Charly
It sounds like a bad idea to perform Scrapping using selenium (and selenium is not an scrapping tool btw) in a HTTP request, my recommendation is to have the scraping thing in a different process and run it periodically or asyncronously store results on DB and the check the results in the HTTP reqest
Son
What does your code look like?
Admin.site.register(modlename)
Son
I am using it still not able to see on screen
0x01
Admin.site.register(modlename)
from .models import modelname
Son
That's done
Рашид
How to find the duration of the video when uploading to the server?
Charly
How to find the duration of the video when uploading to the server?
From django you can't, it needs to be uploaded in the server to be accesible for django
Рашид
Рашид
Ty
Ameer
In django i created a html template for like a registration page type like first name last name emil phone number field after fill the form then click a registration button after the i need to store those details in mangodb db can you please any one help me.. to solve the problem..
Jay
How to use order_by query after sliceing a query
Jay
Please help
Charly
How to use order_by query after sliceing a query
Show an example of what you want to do