EN
Hi Guys, can someone suggest how to separate Seller and Buyer users in sign page as well separate in database and admin panel? Currently both Sellers and Buyers models inheritance from Django User Authentication model
Anonymous
Hi can anyone have durgasoft django tutorial pdf and videos
EN
Create two different models for both types of users
I have two separated models, but user for each model belongs to main User django authenticatiob
Angel
Hello Guys?
Angel
in terms of good support, Which version of Django should be i use? Django 2.2 or Django 3.1.7 ?
Ulan
I have two separated models, but user for each model belongs to main User django authenticatiob
U might want to create a is_buyer field like is_buyer = models.BooleanField()
Mirco
in terms of good support, Which version of Django should be i use? Django 2.2 or Django 3.1.7 ?
Are you starting or do you have an existing Django project in production ?
Angel
From Sratch to production.
Mirco
From Sratch to production.
You can use the latest stable So if I don't go wrong 3.1.x
EN
U might want to create a is_buyer field like is_buyer = models.BooleanField()
I did something like that , but still when I am trying to login as Buyer the same way I can login with the Buyer user to the Customer
ogassi
Hi, everyone ! How knows how to change DateTimeField format in models?
mat
Hi how can I get all defined routes in django
Anonymous
How can i accept 2 form in CBV?
Ubaid
Hello, How to restrict a user from accessing an Django app without email verification?????????
Angel
using user.active value
λ reo
😲
Hamid Reza
Hi everyone , can we access and check files before upload is finished?! I want to make validation before request enters View to check if file is bigger than 1GB then , reject that. Can we do this is django without waiting for client to complete upload process?! I know that we can add this validation in front but I want to add it to BE so no one can upload a big file outside of FE
Ubaid
using user.active value
Tried doing...is there any reference or documentation how to implement this ????
Ubaid
This is view file
Ubaid
I want to restrict the use from accessing the django app without the email verification???
Ubaid
User*
Samoiddin
Hi guys ! How can I write my custom html css form in StackedInline?
M.
Hi everyone. I'm new to Django. I want to know how can I check if slug exists? So if I want to create a new page in admin with the same URL (slug) as the other page it won't allow me to create the new page.
RIJ
hello guys i have a bad request error and i dont know how to fix it i am not fimiliar with react so much so if u can help me please look at this question os stackoverflow or hit me here on telegram https://stackoverflow.com/questions/66372683/im-getting-the-400-response-error-in-react-js-i-know-the-backendd-is-ok-but-the
хомка
and you can check it on your phone even if Django is running on your laptop
Ubuntu: Settings - Wi-Fi - Click on right icon - check your local ip (192.168.1.20 for example) Add that ip to ALLOWED_HOSTS in settings python3 manage.py runserver 192.168.1.20:8080 Now you can visit site from phone Url: 192.168.1.20:8080 (Pc and Phone must be connected to one WiFi)
âshîsh
Or just type that IP
That is for multi-purpose. IP, localhost all will work
Mirco
That is for multi-purpose. IP, localhost all will work
Yes but it's not a best practice In dev mode is ok 😊
Pranav
Hello guyz any idea on how to create a to do list app with multiple user login
Full stack developer (React, Django)
Can anyone please suggest me some recipes search free APIs . . Which do not have any seach limit
Héctor
How to translate this query https://pastebin.com/QSsdjiy3 to django orm language?
Héctor
How to translate this query https://pastebin.com/QSsdjiy3 to django orm language?
I have a transactional model with generic relationships and I must subtract the sum of the inputs with the sum of the outputs to obtain the quantity
Héctor
This could be a valid solution? What do you think? https://pastebin.com/Zg6bxgxv
Anonymous
user account
𒂵𒐊𒍝𒊏
Hi any 1 have the code of pyment in django
Pranav
You should use session or cookie
I have created it but all the users are able to see each other's todo list
Luis
how do i log "some message" if i don't wanna use logging.error ?
Luis
should I use debug or info?
Almaz
Hi guys how can I make query to find all questions that is in less than 2 variants: My models: class Question(models.Model): .... class Variant(models.Model): questions = models.ManyToManyField(Question)
Almaz
qs = Variant.questions.through.objects.annotate(q_count=models.Count('question')).filter(q_count=1).values('question')
Almaz
I tried to do this
Almaz
But it didnt work, can someone please say how to do it?)
Luis
how do you get data from a fk in the shell if you want to use it to save a record (please explain process)?
Rahkmanuly
user_fk.name if you want to retrieve its fields value
Rahkmanuly
is it select_related() ?
select_related and prefetch_related nearly the same functions. They does JOIN database operations between related objects. The main difference between is that select_related is used only with OneToOne and ForeignKey Fields. Whereas prefetch_related used on ManyToManyFields. Please correct me if I am not saying right definition.
Luis
user_fk.name if you want to retrieve its fields value
so this would mean I have to determine which name I want to use before using it, I would just check if the name exists on the table before I choose it
Geetanshu
Anyone can help me ... I am getting operationalerror ...how to fix it
Deleted
Guys, please help with this login question, thanks, https://stackoverflow.com/questions/66382049
Anonymous
How do I build the following? https://stackoverflow.com/questions/66377727/how-do-i-group-results-based-on-categories/66378257
Rahkmanuly
In case if you want to retrieve related objects field value
Sourabh
MultiValueDictKeyError at /login 'name' Please help me this is coming while login to the page
moshe
We need to see your view function and what you send from the front-end on login
Anonymous
I need to generate random username and password from Django admin site(ONLY) and sent mail to the users having username and password. I can create random username and password but how to link/add button/link in admin site to create random username and password.
Anonymous
Like add user in User's section how can I add create user button?
Ofensive
Hi, please why create hypertext link in Django
Anonymous
!report
Anonymous
Actually task given is that we have some data of students (e.g.) and we have to create their accounts. And site don't have signup/register functionality. So admin will only have to add email and username and password should be sent to respective mails.
Anonymous
.
Anonymous
Getting "django.db.utils.IntegrityError: FOREIGN KEY constraint failed" in cmd
Ajitesh
Paid help , Django , django_nonrel and rest
Agent Q
It's expired. Use something else
Ajitesh
It's expired. Use something else
Mongo_db engine is not working with python 3.5 and above.
Someone
Hi, I have a requirement to update the row number of a user wait list based on number of referral they do. If there are 3 users on waitlist the order will be based on the datetime they joined. when the 3rd user on waitlist, referr another user to join waitlist the 3rd user moves one position above in the waitlist. He will be now 2nd and the user who was 2nd will be on 3 now. Am thinking of using row_number and rank to do this. But not able to do it, kindly help
Ajitesh
Try django-storages
Yeah that can also work.
Agent Q
So what should i do?
Provide a value
Ajitesh
Provide a value
Foreign key needs relation so pass parent primary key .
Someone
Don't need row number and don't need to store rank. Just use sort by number of referrals and there's your array
Sorting by number of refferals will bring 3rd user to top (1st place when the other 2 users have not referred anyone). But I need that user to just move one place up in the list
Agent Q
Then the logic won't work