Mirco
Mirco
Django is a web framework
So you can build web apps both backend + frontend
Or just develop APIs
Mirco
ㅤㅤ
L¿<>
Ok
But dont waste time with django-templates
notyour
guys for developing apis any particular video playlist you wanna recommend
notyour
??
Rajesh
I'm using django to develop my project after deployment can I use Admin panel??
Like now I'm using localhost:8800/admin after deployment can i use www.domain.com/admin
The TokenTitan
Rajesh
Yes, it works
Sure?? If means the username and password will be the superuser password right
The TokenTitan
Rajesh
L¿<>
Rajesh
L¿<>
Rajesh
Path()
Rajesh
In urls path
Instead of empty path(' ',incl....) I need to change some valid name??
Angel
L¿<>
urlpatterns = [
path("CHANGE HERE whatever you want /", admin.site.urls),
,
]
Rajesh
The TokenTitan
Exactly, I don't use the /admin to route to Admin panel
I use something very uncommon
Rajesh
Can you guys share sometips like this. Because I'm new to django
Rajesh
I'm going to deploy my own personal project
Rajesh
$@£d@®
When I try to send activation mail to my email I get this error
failed to send activation email to example@gmail.com, error: (530, b'5.7.0 authentication required. for more information, go to\n5.7.0 https://support.google.com/mail/?p=wantautherror d2e1a72fcca58-70b1b6382c5sm2889119b3a.34 - gsmtp', 'webmaster@localhost') in django
So what can I do to avoid this error
John
John
Is , I can able to deploy my project on this site freely..???
The TokenTitan
The TokenTitan
The TokenTitan
Priyanshu Pratap
Priyanshu Pratap
The TokenTitan
The TokenTitan
Priyanshu Pratap
The TokenTitan
Like jwt or something
The TokenTitan
It's best to use token authentication
Because if you want to implement pure authenticate() and login() it will not be persistent because Evey request is entirely different so it needs to login again
The TokenTitan
Look up
Simplejwt django rest framework
It's the recommended way to achieve that in. DRF
The TokenTitan
With that, you can pass the access token to the front-end and when a request is made to the Django and the token is also detected, you will be free from frequent logging out and all
You can configure it and customize it
Just do that and let us know when else you have issues
Priyanshu Pratap
ask
Please explain what you're trying to do
Samuel
The TokenTitan
I am sorry this isn't well explained
more information and details
Alex
there is third party package for that.
The TokenTitan
Okayyy
You mean one out of them is like a main Image and the others are saved after the main one has been saved
The TokenTitan
Well, let's see your models.py and your views.py
The TokenTitan
Please use pastebin.com
The TokenTitan
Even from this I don't see where 'Zwie' is being assigned a value
Also, you cannot access that 'Zwie' if at all its being passed you need to access it like
If 'zwie' in request.POST.keys()
So that if condition will not evaluate to True
Emmanuel
Mehdi
Emmanuel
alright
eric
I don't see EMAIL_HOST_USER in your settings
$@£d@®
I got it I didn't use email host password in my settings.py that's why I got this error
Jahongir
Hello everyone, I have released a package for PyPi. What should I do to ensure that this package is verified, that is, so that it appears in a Google search?
Rajesh
You can add filter code in admins.py if you are using admin panel to filter
Flam
Overide the queryset and use filter(username__id=self.request.user.id)
Suryo Adhy Chandra
give an id with primary key or unique=True
Suryo Adhy Chandra
you must control it in override on save method
https://www.geeksforgeeks.org/overriding-the-save-method-django-models/
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Hi everyone
I have a question, which way is better for Writing queries:
Use django orm or write queries in stored procedure and then import it?
cj
Charly
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Charly
Charly
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Then ask that person
He said sp is better because we must separated queries from our app codes
And I dunno he said the truth or not
Charly
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
🤷♂
Ok thanks bro
I use orm and dont care what he said
cj