Django and DRF
322 subscribers
98 photos
39 files
161 links
Purpose is sharing, spreading knowledge which is most related to the Django and Django Rest Framework(DRF)

You can find in here my
- Articles
- Projects with source codes
- Videos
and another useful stuffs
Download Telegram
Now 😎😎
I didn't know this but I have learnt today
❤‍🔥1👍1
Before when i use APIView 😢🥵

Frontend Dev
: why there is not URL 😡😡
Me: 😢 To I used APIView
Django ModelForm: What is save(commit=False) used for ?
Forwarded from Davronbek | SWE 🪐
Pythonda Rasmlar bilan ishash uchun qulay package Pillow documentation 🖼

Lang 🇺🇸
Forwarded from Davronbek | SWE 🪐
python_pillow_tutorial_201120103542.pdf
2.2 MB
Python Pillow 🔥

Lang 🇺🇸
@Davron_coder
Django da qanday qilib userlarning IP Address larini aniqlab ,ularning GeoLocationini topishni urganmoqchi bulganlar uchun juda yaxshi maqola ⚡️⚡️🥳

https://medium.com/@arrosid/get-visitor-location-using-geoip2-in-django-32ad3d417115
👏5🔥1
For CSRF Problems in Django >= 4.0


Solutions
1. Above Image ->
CSRF_TRUSTED_ORIGINS = [
'https://subdomain.example.com',
'https://*.blob.com',
...
]

2. Please put -> {% csrf_token %} inside <form> tag.

3. Corsheaders ->
* pip install django-cors-headers
* add 'corsheaders' in installed apps

4. Use decorators for view functions ->
from django.views.decorators.csrf import csrf_exempt, csrf_protect