og
ok, sorry
og
Hi all, I have an application with animations in three.js+vue how best to fit it on the site? What are the best technologies to use ?
Kim
Search for corey schafer django o YouTube
alhrmjmml
hello group! I have a question: I have developed an ecommerce in Django and I need a library to implement the card payment. what do you recommend?
Charly
alhrmjmml
for local payment processors
alhrmjmml
Sorry, I dont understand about local payment processors
Charly
Sorry, I dont understand about local payment processors
A company that does the credit card processing and offers it as a service, you won't the able to process cards directly
alhrmjmml
What type of local payment processor do you recommend?
Charly
What type of local payment processor do you recommend?
I can't recommend one because I don't live in the same country as you
alhrmjmml
ok
alhrmjmml
do you know redsys?
Charly
That's what I mean with 'local', for examt I used stripe, but not sure if is available for you
alhrmjmml
I'll take a look
alhrmjmml
thank you very much
Batman
https://dpaste.org/P6pr2
If you're creating a custom user model why not put the additional fields in there itself, instead of creating two separate user model
Raghuram
Need a django helper.
Doragonsureiyā
Need a django helper.
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
demon
If you're creating a custom user model why not put the additional fields in there itself, instead of creating two separate user model
It's called extending the user model. It's recommended to only keep auth related fields in the auth user model. And other fields like date_of_birth in a profile model.
Rasul
Is there any way to save image file with different sizes in one model field in Django, thanks in advance
Mirco
Is there any way to save image file with different sizes in one model field in Django, thanks in advance
if you don't put validators about size, u can save whatever image u want
Poppu
Guys is there any easy way to configure django SMTP server with Gmail API.
Rasul
yagnalatha
Does Django support ipv6?
Maxim
Does Django support ipv6?
google django ipv6
yagnalatha
Iam trying run Django project using system ipv6 adress
yagnalatha
But it's not working
Doragonsureiyā
But it's not working
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Uday
# {'message': [ErrorDetail(string='Account with username does not exists.', code=404)]} how can i extract code from this?
No one
SELECT mo1.movie_name, mo1.movie_length, mo1.age_certificate FROM movies mo1 WHERE mo1.movie_length > ( SELECT AVG(mo2.movie_length) FROM movies mo2 WHERE mo1.age_certificate = mo2.age_certificate )ORDER BY mo1.age_certificate;
Doragonsureiyā
Hello , please anyone says me that how work this query?
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Arsen
Hello to everyone, how to make this work {% if forloop.counter % 3 == 0 %} ? help pls
Denis
why is the same project outside and in docker-compose working fine on my computer, but on vps it hangs after button click on frontend (it just works and after click - does not output anything to the logs, and does not crash) i limited memory to 20mb - it does not hang locally. so its not a memory issue
Batman
It's called extending the user model. It's recommended to only keep auth related fields in the auth user model. And other fields like date_of_birth in a profile model.
My point is, they're not extending it right, they already subclassed the user, hence extending it, but then again they create a subclass for their extended user model and passing it in settings
AL
Can someone tell me how to filter a column, Like for example I have a table in which I have one column for status so now I want to just retrieve just the status column for all the rows, can I do that?
Anonymous
i have one integer field i want to add/update more number to it without deleting previous one numbers
Anonymous
thank you
cj
But it's not working
read here: https://docs.djangoproject.com/en/4.0/ref/django-admin/ it's supported since 8+ years ago ¯\_(ツ)_/¯
cj
Does Django support ipv6?
yes, since 2014 or so
cj
doing a deeper investigation, Django supports IPv6 since 14~12 years ago for runserver https://code.djangoproject.com/ticket/7735
Anonymous
Add as in create a list of numbers?
how can i put that lists item into character field
Kd
Hello all, It's possible to recover deleted data? Data was deleted from admin panel?
Shubham
How to filter unique data from models views please help me
cj
Hello all, It's possible to recover deleted data? Data was deleted from admin panel?
if you have a backup, yes... otherwise, no —unless you do some black magic—
Alex
simply use filter
Isha
how to delete Outstanding tokens when user logout
Shubham
simply use filter
Yes but same type user comming i want only unique not same user
cj
how to delete Outstanding tokens when user logout
write the corresponding code to delete them in the logout view ¯\_(ツ)_/¯
Shubham
Product.objects.filter(user_id=request.user) So i have a result like user name is 1. Shubham 2.Gaurav 3. Gaurav 4. Tushar 5. Shubham But i want only 1. Shubham 2. Gaurav 3. Tushar I am using django 3.9 and database mysql
Shubham
use .distinct()
Not working
cj
Not working
should work, unless you're doing something wrong ¯\_(ツ)_/¯
cj
by using .distinct() is the way to fetch unique values from queries
Shubham
How to handel For loop after .distinct ()
cj
How to handel For loop after .distinct ()
that's another different story
Shubham
Please tell me
cj
Please tell me
you'd better explain what you're exactly doing, show your code, show traceback —if any— and other details, we can't help you if you just tell information as grains of salt one by one, ask a good/smart question and you'll get proper help
Uday
I've written manytomany field relation and also a method which checks if the relation exists but this is on the model part how do i create an object in views to check if the relation exists? user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="user") friends = models.ManyToManyField(User, blank=True, related_name="friends") def is_mutual_friend(self, friend): if friend in self.friends.all(): return True return False
Harry gorilla
from django import forms PRODUCT_QUANTITY_CHOICES = [(i, str(i)) for i in range(1, 21)] class CartAddProductForm(forms.Form): quantity = forms.TypedChoiceField(choices=PRODUCT_QUANTITY_CHOICES, coerce=int) override = forms.BooleanField(required=False, initial=False, widget=forms.HiddenInput) From here, quantity: allows the user to select a quantity between one and 20. You use a TypedChoiceField field with coerce=int to convert the input into an integer. What if i will want quantitiy to allow users select a quantitiy between one and infinity? How should i put it?
Uday
use method itself
So something like user.is_mutual_friend(user)?
Shubham
How to handel For loop after .distinct ()
After using this for loop not working and objects showing queryset [{'pid':1}, {'pid':2}] like this
Batman
how to delete Outstanding tokens when user logout
Can't open that link, please check
Alex
So something like user.is_mutual_friend(user)?
yeah but how does it check for mutual friends, all it is doing is to check if relation between "friend" and current user exist or not, which is more like checking if user and requesting users are friends or not.