cj
it is better to use 2.2 LTS until 2022 or 3.0 ..
are you gonna start a new project? if yes, then use 3.x are you maintaining a project currently using 2.2? if yes, then keep that version (but don't forget to keep it updated to be ready to switch to 3.2 in the near future)
Shreehari
Hey guys, How can i check for security vulnerabilities and stuffs when working with DRF
Anonymous
Hey guys, How can i check for security vulnerabilities and stuffs when working with DRF
How to make Django project more secure : https://opensource.com/article/18/1/10-tips-making-django-admin-more-secure Django Admin safer ; https://hackernoon.com/5-ways-to-make-django-admin-safer-eb7753698ac8 https://www.ponycheckup.com/(Pony checkup report for websites) Inside Setting.py : SECURE_HSTS_SECONDS = 86400 SECURE_SSL_REDIRECT=True SESSION_COOKIE_SECURE=True SECURE_HSTS_INCLUDE_SUBDOMAINS=True SECURE_CONTENT_TYPE_NOSNIFF = True CSRF_COOKIE_SECURE = True SECURE_HSTS_PRELOAD =True SECURE_BROWSER_XSS_FILTER = True X_FRAME_OPTIONS = 'DENY' (if required)
Fabian
how can i update a model automatically after a spcific field on another model is modified?
Fabian
What i want to do is this: i have a user model, 2 types of user lawyers and admin, the admin approve lawyer profile on the Django Admin, by changing the status, i need to create a log of what admin approve each lawyer and when, i have a model for that
Fabian
i read that i could use Django Signals, but i dont really know how to
Knight
GET request works just fine, but with same API Im having following error when I request POST method. HTTP 403 Forbidden { "detail": "CSRF Failed: CSRF cookie not set." } I've already set following on my class. @method_decorator(csrf_exempt, name=dispatch)
Gil
how can i update a model automatically after a spcific field on another model is modified?
HI! Hooks are the callables that you want to execute when a specified signal happened. Django provides system signals that announce that something has happened in their system. One such signal is that a model has been saved. https://medium.com/django-musings/django-s-hooks-and-signals-6166369d798b
Gil
Sorry but I didnt get you. did you find any solution?
name='dispatch', no dispatch, is very diferent!!! , you undersand? If noot, you need to read more basics
Knight
name='dispatch', no dispatch, is very diferent!!! , you undersand? If noot, you need to read more basics
Sorry, Actually Ive just mistyped here, its name='dispatch' in my code
Gil
Sorry, Actually Ive just mistyped here, its name='dispatch' in my code
so you have something unidentifyed before, the request isn't going into this View. I can't help more, but I can assure that a simple view with this decorator , works.
Gil
try debyug debug try
Adiziel
I have multiple forms contact, enquiry and opportunities in forms.py And I want to link them to html contact form , enquiry form and opportunities form respectively Now problem is all these html forms are in single html file plz help
Anonymous
I sometimes get a CSRF token error even if the token present in the Django Template. This doesn't happen Everytime, it happens around 1 out of 4 times but it's annoying the users. Any help?
S
I have messed up with my login_required decorator can someone help me by connecting
Adiziel
Like I have 3 different forms how can I associated one to one like contact form block in html to contactForm class
Adiziel
What is the problem?
Im beginner brother
Adonis
Hummm so you have one view and that view should show and handle 3 forms ?
Adiziel
Yes exactly
Adonis
One way to handle that is to write the form validation logic 3 time in the view
Adonis
Another way is to use some packages
Adiziel
One way to handle that is to write the form validation logic 3 time in the view
Hey I have a quick question after writing 3 logics I have to connect with help of action in html form write?
Adiziel
Right*
Gk
I am working on a website which is not a product it’s just a practice app I am doing to learn django , want to run it on server , it’s not finish yet but I want to upload what I have done till now and keep updating and upload it on same server - I know about filezila PHP web development but how we do with django?
vijay
For Django transaction any reference with example, except official doc
Gk
Didn’t understand you ?
vijay
For Django transaction any reference with example, except official doc
I need a reference for transaction in django with example, except official docs
Knight
In following link, it says about SessionAuthentication. 1. Ensure that the 'safe' HTTP operations, such as GET, HEAD and OPTIONS cannot be used to alter any server-side state. 2. Ensure that any 'unsafe' HTTP operations, such as POST, PUT, PATCH and DELETE, always require a valid CSRF token. What if I use https? https://www.django-rest-framework.org/topics/ajax-csrf-cors/#csrf-protection
Anonymous
You can deploy here.. its free
nups
?
Yes pythonanywhere is a good choice.
Adonis
Action=/url-to-the-view
Gk
Yes pythonanywhere is a good choice.
Any reference how to do it ?
Anonymous
How to schedule code in django ? Is there any scheduler
Xavier
How to schedule code in django ? Is there any scheduler
https://medium.com/@kevin.michael.horan/scheduling-tasks-in-django-with-the-advanced-python-scheduler-663f17e868e6 i have used this and not at all disappointed
Hashiq V H
Friends i am facing a problem while using pycharm when create or edit something inside the app folder there get a issue "permission denied" how to solve this😕
Anonymous
hey
Anonymous
Can i Write backend without 'form' n
Anonymous
?
Anonymous
are 'forms' compulsory to learn ?
Anonymous
its fine to dont use " forms ?
cj
yes
but you're gonna do a looooot of manual work
cj
its fine to dont use " forms ?
actually not... why don't you want to use forms?
Anonymous
actually not... why don't you want to use forms?
not that flexible and hard to learn
cj
not that flexible and hard to learn
they are flexible enough and easy to learn actually 🤔🤔🤔
Anonymous
your should learn them, yes
any simple reference expect official docs
cj
what are you trying to do?
cj
any simple reference expect official docs
official docs are good explained
Anonymous
umm let me try again...
Anonymous
one more time
cj
I can say, django's official docs are one of the best documentations of open source projects
Anonymous
umm let me try again
Anonymous
How do I add text formatting to my blog? Paragraph, text bold, italics etc etc Anytime I render my model.TextField (), no paragraph is seen. Everything get rendered as one paragraph.
Alex
not that flexible and hard to learn
How do you know if they are not flexible if you haven't read the docs?
Roman
By the way are forms used in rest somehow ?
Mirco
By the way are forms used in rest somehow ?
The form are written frontend side On backend you write serializers
Anonymous
I am new to Django
Mirco
Doragonsureiyā
I am new to Django
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Anonymous
Thank you.. I have a doubt regarding registration forms and upload pdfs and download rendering pdfs
Mirco
Thank you.. I have a doubt regarding registration forms and upload pdfs and download rendering pdfs
You find all you need on internet, there are so many tutorials about registration and uploading files
Anonymous
Alright.. Some video resources could be helpful
Mirco
Alright.. Some video resources could be helpful
On Udemy or YT you can find lots of resources
Anonymous
But couldn't find that thing.. Which am searching for.. Maybe i have to research in deep