Rohan
Read requests doc for file upload
Hugo
OK...let me check
Kostya
Hi, how a u? Maybe who did use pysftp for connection by sftp with secret key?
N S
Guys i have a question which is the best tool used to send sms in a django application
Alexander
sms is not good choice for anything in 2019 (for security reasons)
Alexander
only for phone verification may be
Alexander
https://www.twilio.com/verify
Alexander
I know some of telegram accounts of russian opposition were hacked because of sms (SS7)
Alexander
https://habr.com/ru/company/pt/blog/283052/ (ru)
N S
What is the max limit in twilio
Alexander
I don't use it, but I know, it's one of the leaders on this market
Anonymous
If all my requests need authentication do I still need csrf token?
Why?
Anonymous
So that's a yes
Anonymous
I'm not gonna find a way to remove csrf token
I just was wondering if someone is gonna attach with cross site forgery well their request will be denied. Then csrf token is obsolete.
I am wondering this 👆👆. Not that I'm proposing it
Mirco
Make a search on Google first
Anonymous
Hello.. Any tried to upload croped image to db in django ???
Anonymous
Is there any package or only JavaScript ?
Anonymous
Any idea guys.
Mirco
Mirco
Anyway there's a django package that can help ya
Anonymous
You have to setup a view for doing it
I tried to crop the image which upload. But it's fixed. What i meant is suppose you upload your photo in facebook. You can crop na ?? That's what I'm talking of.
Mirco
Anonymous
Can idea mahn.
Anonymous
?
Mirco
Yep, you need to do that job in a UpdateView , not CreateView
Anonymous
.
How to render form into template created using forma.py
.
forms.py
Anonymous
Check documentation
Anonymous
Template tags also.
.
Tq
.
Do you have any sample project on django to do crud operation
Mirco
Yusniel
Hello everyone, I'm refactoring a Django project. I need to put all of common functionalities (auth, notifications, mails, etc) in a common app inside of the project and every app have to use it. Is there a way to do that? How I should to structure my project?
Yusniel
I'm new in django BTW.
Nitesh
How to render form into template created using forma.py
Class MyView(TemplateView):
form_class = YourForm
template_name = 'project/index.html'
def func(request):
your_form = YourForm()
return render(request, 'project/index.html', {'your_form': your_form})
Nitesh
Use {{ your_form }} in your template
Nitesh
Authenticate your form using HTTP request in your function
Nitesh
I use CBV you can use FBV
.
Is anyone have sample django crud app do share
N S
I can't exclude a primary field in modelformsetfactory can anyone help
Mirco
N S
Mirco
We don't have a magic ball, if u share your code we can help ya
N S
https://dpaste.de/xMdb
N S
my forms.py
N S
my models.py https://dpaste.de/UL76
N S
my views.py https://dpaste.de/fAjv
N S
the html rendered by views.py https://dpaste.de/H93a
N S
no change
Mirco
Even in models
N S
i have added in forms and views but no change has happened
N S
here is the request.POST data https://dpaste.de/6vP6
highnes
I have two html files index.html and user.html the user.html doesn't load static files, can anyone help.
Mirco
Nitesh
highnes
Ive done that
highnes
Still it dsnt load static files
pino@mastrobirraio ~$
Still it dsnt load static files
did you add this to your main urlpatterns?
urlpatterns = [
...
...
] + static(
settings.MEDIA_URL, document_root=settings.MEDIA_ROOT
)
Mirco
pino@mastrobirraio ~$
In this case obv
highnes
pino@mastrobirraio ~$
Because you need to import it
pino@mastrobirraio ~$
from django.conf.urls.static import static
highnes
Still no static files show up
Mirco
highnes
https://dpaste.de/Jq4U