hm
hello everyone how can i create an image gallery in django so that a product can have more than one picture
$_u_d_d_y
you could create a model with imagefields and a product foreignkey
Jonathan
Hi ! Some tutorial for making live score football website in django
Akhmadjon Akbarov
Charly
Hi ! Some tutorial for making live score football website in django
I don't think you may find too much tutorials in such specific system, better to think your project very well and split your project in small parts that can be looked at tutorials
Doragonsureiyā
Hello how are you?
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Charly
hello everyone how can i create an image gallery in django so that a product can have more than one picture
create a model that is going to hold the image and ad a fk to the product model, so it creates a One to Many relationship
Seyed Alireza
JWT in Django?
Yes I create authentication with jwt in Django but I don't know how to create login. request.user = anonymous user
() { :;}; echo Nickolas
Yes I create authentication with jwt in Django but I don't know how to create login. request.user = anonymous user
If you're using drf_simplejwt or something like that you don't need to do anything but check permission classes in your viewset
() { :;}; echo Nickolas
Drf_simplejwt exposes endpoints for logging in and getting a new token, read the documentation
D
Guys is companies nowadays are using django as a full stack
D
Or drf for the backend and a javascript framework for the fromt
() { :;}; echo Nickolas
Or drf for the backend and a javascript framework for the fromt
Drf is literally a rest framework. It wouldn't make sense to use it "full stack"
D
I know i am talking about companies
D
Are they using django with its templates
D
Or drf for the back and react for the front
Charly
I know i am talking about companies
All companies are different
Charly
You will find both ways to work
Koen de
Or drf for the backend and a javascript framework for the fromt
This. Django+React for a Procurement and AP Automation cloud-product for hundreds of customers in Europe
D
What about django vue
Doragonsureiyā
What about django vue
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.
D
I love this stack or i have to use react instead
Charly
I love this stack or i have to use react instead
you can do whatever you want or your employers wants
Андрей
Hi everyone! I trying to use bfa library to get unique hash of user`s browser, but I can`t run it in my project: get() argument must be WSGIRequest, not <class 'django.core.handlers.asgi.ASGIRequest'> How can I fix it? Or maybe another browser fingerprint library exists?
() { :;}; echo Nickolas
I love this stack or i have to use react instead
Your stack is irrelevant as long as it perform http calls towards your backend. Then again, if you think "you have to use react" you have a long way to go
Андрей
Charly
Maybe you know alternatives?
No, sorry But Yoou can search for them
Андрей
Google returns human fingerprint only or bfa again :)
Андрей
Thank u all
() { :;}; echo Nickolas
Google returns human fingerprint only or bfa again :)
Well, you could just read out the header yourself and extract the required info
() { :;}; echo Nickolas
Or if you have a segregated back and front end capture the fingerprint in the js app with fingerprintjs and send it home
sufiyan
Hello i'm not able display the validation error in template, when registering with the correct credentials it creating the user but when entering the wrong credential for an example if i enter password 1 and password 2 differently i want to display the error in templates.
sufiyan
I'm getting an error the "User could not be created because the data didn't validate "
sufiyan
https://linkode.org/#GOYlmVM7nQ8IOdsV9mrsi3
sufiyan
when i register with the correct data for an example if i register with the validation requirement it create the user but when i enter the wrong details its giving me an error "User could not be created because the data didn't validate " but i want to display the error
hm
Do you know whats a foreign key?
a many to one relationship? but I don't know how exactly to use it
Charly
a many to one relationship? but I don't know how exactly to use it
Now the opposite The idea is to create a model that has the image and a foreign key to the product, then the product can have multiple images
Charly
but still need lots of help
Well then be specific on what you need help for
Charly
And also, try to do something by yourself in order to have someone help you
Charly
I mean in the future
the group will be here in the future
Nasir Ahmad
Hello In order to be able to use our Gmail account in Django and send emails, we need to activate the less secure app. But for now, gamil has disabled this option and we can't activate it, and when I use it in Django, I get an error, what is the solution?
Raj
how can i add extra user model for seller
Raj
any one please teach me multi login system like for byer and for seller
Amir
Hey everyone i want to start learning django Can u suggest courses for start?
Avii
Hey everyone i want to start learning django Can u suggest courses for start?
Go to some YouTube tutorial And after that Start reading and practicing django documentation
M
Hello Does anyone know how to remove the required model form?
Jay
Hello
Jay
My I'd elements in html page is changing with loop
Jay
How to get that exact I'd in javascript
Jay
Please help
Maxim
How to get that exact I'd in javascript
this is the Django group, not a JavaScript group
navid
hello can someone explain how render_to_string works? what does it get and return? i couldn't find an explanation in djangoproject.com
maverick
I guess render to string mostly used to send email. U will get template as string while using this method
navid
tnk u
Farzin
Hello everyone, Why the first code that runs on Django shell returns value False but second one from Django view not? >>> from django.utils.timezone import now, timedelta >>> c = now() + timedelta(hours=-5) >>> n = now() >>> d = n - c >>> d < timezone.timedelta(hours=4) >>> d < timedelta(hours=4) ANS: False Returned value: '5:00:28.061615' view.py overall = OverAll.objects.create( over_all=50, partner_location=self.partner_location, created=now() + timedelta(hours=-5), updated=now() + timedelta(hours=-5) ) over_all = OverAll.objects.filter(partner_location=partner_location).last() delta_date_time = timezone.now() - over_all.created if delta_date_time < timezone.timedelta(hours=4): ... else: ... ANS: True Returned value:0:00:00.158148
cj
hello can someone explain how render_to_string works? what does it get and return? i couldn't find an explanation in djangoproject.com
are you sure? it's in the docs: https://docs.djangoproject.com/en/4.1/topics/templates/#django.template.loader.render_to_string
Vikas
Can any solve my error in query
Doragonsureiyā
Can any solve my error in query
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
Vikas
Okay
Vikas
In query where i am wrong
Vikas
I have to show count in Dashboard
Charly
I have to show count in Dashboard
If you want help show what you have done, the errors you get and any detail regarding that
The Inspired
The Inspired
any one please teach me multi login system like for byer and for seller
Both are the same... both use the same 'User' object. its just that they have different permissions.