Django and DRF
331 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
git.pdf
7.2 MB
Query larni optimizatsiya qilish uchun yaxshi package.
https://django-debug-toolbar.readthedocs.io/en/latest/index.html
👍1
HTTP Request and Response Haders
Main purpose of this article is solving N+1 problem of Database Queries in Django.
Django solves this issue with perfetch_related and select_related. You can read it more in this link: https://medium.com/django-rest/speeding-up-django-queries-59697895a615
NGNIX.pdf
5.3 MB
Nginx has interested me for many months, nowadays i have some time to learn new thing ,my choice was Nginx.
So I am going to train with Nginx and know more informations.
if you know good resources about Nginx ,please share in comment.
1
F expression in Django.

This is cool expression to use where you send queries using the Django ORM to DB.
*You can use this expression to combine some fields in one Table and not takes many data from database.
Django Tutorial
I suppose this is best tutorial for Beginner because before one or two years I learned some languages like html, css, js, python, c++ in w3school.It is understandable, readable, short texts and more comfortable than another platforms.
👍1
Django Supported Versions
👍1
What do you think guys ?

Django Best Practices 🌟

📁 Organize Django settings with multiple files:

- Create a settings/ directory
- Include separate files for each environment:
-
base.py (common settings)
-
local.py (local dev settings)
-
staging.py (staging version)
-
test.py (test settings)
-
production.py (live server settings)

Is that true thought or no ?
Please write down your opinions in comment
If you want to use multiple database in django project you can do it, It is just amazing stuff.

First of all you should fill credentials of your second or third database in "DATABASES" key dict which is located in settings.py of django project, They are included ENGINE, NAME, USER, PASSWORD, HOST, PORT and Name of Database which is using by django orm for Queries For example they are may be second_db or third_db or somthing that you want.
So and after you do all things that we said above you can use db you added in your views with using statement to send queries, if you are saving something to db you can do: my_object.save(using="legacy_users")
through thi you can save one data to multiple db with moving like this:
p = Person(name="Fred")
p.save(using="first")
p.save(using="second")

There is one issue with using Multiple db
Django’s admin doesn’t have any explicit support for multiple databases - more
1
PythonAnyWhere has been supporting free virtual mashines to deploy web application or websites.

This guide might be useful for you to deploy Django application to production I suppose it will be easy to understand and you can run on prod in short time.
API Made Easy 🔥.pdf
18.8 MB
The simple Guide for the API principles.

1. HTTP Verbs:
* POST - send data to server to create resource
* GET - ...

2. HTTP Status Code:
* 1xx - Informational
* 2xx - Success

3. Response Headers:
* Content-Type - Specifies MIME type of the data in the response.
...
4. API Design:
* GraphQL - a query language and runtime for building APIs.
...
5. API Architectures

6. API Design Patterns

7. API Security

8. API Testing

...
Forwarded from ShukurDev (ѕнυĸυralι)
How to make Basic and Full-Text Search in the Django using PostgreSQL 🔎
Language: 🇺🇿

* Used Django queryset lookups.
* Created 1000 Posts to test with Faker package.
* Given information about SearchVector, SearchQuery, SearchRank and Practise on them.
* To have source code in Github Repo.

Article: link
LinkedIn: link
To get source code on Github: link