Forwarded from Davronbek | SWE 🪐
S.O.L.I.D printsiplari
O’zbek tilida ma’lumotlar kam ekanligi uchun Mediumdagi maqola orqali o’zbek tilida yozilgan maqola. #SOLID
https://medium.com/@nurulloh.ubaydullayev2004/s-o-l-i-d-printsiplari-882cd316c312
O’zbek tilida ma’lumotlar kam ekanligi uchun Mediumdagi maqola orqali o’zbek tilida yozilgan maqola. #SOLID
https://medium.com/@nurulloh.ubaydullayev2004/s-o-l-i-d-printsiplari-882cd316c312
Medium
S.O.L.I.D printsiplari
Shu kungacha SOLID printsiplari haqida eshitgan bo’lsangiz kerak.
Forwarded from All About Django
Medium
6 Things to Know Every Python Django Developers — YOU MUST LEARN — BEST PRACTICES
Hi everyone
In short time adding Swagger to your drf api's docs 🍏👍🏽
https://www.jasonmars.org/2020/04/22/add-swagger-to-django-rest-api-quickly-4-mins-without-hiccups/
https://www.jasonmars.org/2020/04/22/add-swagger-to-django-rest-api-quickly-4-mins-without-hiccups/
Jason Mars
Add Swagger to Django Rest API quickly (4 mins) without Hiccups - Jason Mars
Problem Swagger / OpenAPI can be regarded as the de-facto standard for API documentation and sandbox for experimenting with and learning a new API. Adding this to a REST API Django project is important. The process for this integration can have some hiccups…
how to find server's ip address
go to terminal or cmd
linux os: sudo ping website_name
windows : ping website_name
it is amazing 😃😰😂
go to terminal or cmd
linux os: sudo ping website_name
windows : ping website_name
it is amazing 😃😰😂
Medium
15+ Django Interview Questions and Answers for Freshers 2022 | Django Interview Questions for Freshers 2022- Codexashish
Django is an open-source and high-level python-based free web framework that follows MVT( Model View Template) architecture. The Django…
👍1
source: link
solution:
solution:
pip install pyjwt==v1.7.1
2-marta duch keldim shu xatolikka.How to add ssh key to gitlab ?
Understandable article ✅👍🏽
https://medium.com/devops-with-valentine/2021-how-to-your-ssh-key-for-gitlab-on-linux-1b94e2a3a49a
Understandable article ✅👍🏽
https://medium.com/devops-with-valentine/2021-how-to-your-ssh-key-for-gitlab-on-linux-1b94e2a3a49a
Medium
[2022] How to set up your SSH key for GitLab on Linux (Ubuntu / Mint)
One of the most common issues while getting started with Git and GitLab is setting up the private and public keys. I will be using Linux…
Denis Ivy is one of the best Backend Developer for me 💪🏻
you can read his answer👇🏻 for this 👆🏻questionhttps://medium.com/@dennisivy/what-level-of-proficiency-is-required-in-django-to-get-a-job-ff514d04bdc2
In Linux OS Useful Commands ⚙️💪🏻
🔎 Searching any word in any file:
👁 Viewing difference between 2 files:
🖨 Printing text to display:
📨 Taking full information about any command:
⚒ For change your password:
1.
2.
3.
🔎 Searching any word in any file:
grep search_word path_to_file
e.m: grep content shukur_dev/about.html👁 Viewing difference between 2 files:
diff first_fille_path second_file_path
e.m: diff local/index.html global/index.html🖨 Printing text to display:
echo some text
e.m: echo hello world📨 Taking full information about any command:
info one_command
e.m: info sudo ⚒ For change your password:
passwd
🗂 Saving Results to a File: 1.
pwd > one_file
(in this saved path).2.
ls > second_file
(in this saved name of files or folders)3.
pwd >> second_file
(for save from continuation of file)🔥1
#Question❓
imagefielddan keladigan rasmni o'zim xohlagandek nomlab saqlab qo'yishim uchun nima qilishni tavsiya berasizlar?
#solution✅
def get_path(instance,filename):
return "site_media/jobs/%s_%s/%s" % (instance.client, instance.job_number, filename)
class CCEntry(models.Model):
....
pdf = models.FilePathField(path=get_path, match=".*\.pdf$", recursive=True)
imagefielddan keladigan rasmni o'zim xohlagandek nomlab saqlab qo'yishim uchun nima qilishni tavsiya berasizlar?
#solution✅
def get_path(instance,filename):
return "site_media/jobs/%s_%s/%s" % (instance.client, instance.job_number, filename)
class CCEntry(models.Model):
....
pdf = models.FilePathField(path=get_path, match=".*\.pdf$", recursive=True)
Forwarded from Shukurali Rezamonov
Assalomu Alaykum
#savolboredi
list ga objectlar terib chiqilgan tartib buyicha ,hozir shu tartib buzilmagan holda Model da mavjud bulgan objectlarni listdan olishim kere . Qanday qilsam buladi shuni ?
hozir men:
any_list = [obj1,obj2,obj9,obj4...]
Estate.objects.filter(id__in=any_list)
shunaqa qilsam tartib yuqolib ketyapti .
#savolboredi
list ga objectlar terib chiqilgan tartib buyicha ,hozir shu tartib buzilmagan holda Model da mavjud bulgan objectlarni listdan olishim kere . Qanday qilsam buladi shuni ?
hozir men:
any_list = [obj1,obj2,obj9,obj4...]
Estate.objects.filter(id__in=any_list)
shunaqa qilsam tartib yuqolib ketyapti .
Shukurali Rezamonov
Assalomu Alaykum #savolboredi list ga objectlar terib chiqilgan tartib buyicha ,hozir shu tartib buzilmagan holda Model da mavjud bulgan objectlarni listdan olishim kere . Qanday qilsam buladi shuni ? hozir men: any_list = [obj1,obj2,obj9,obj4...] Es…
Stack Overflow
Sort queryset by values in list
Is it possible to sort a django queryset by the list of elements provided in the query?
For example, if I do
m.objects.filter(id__in=[3,1,8])
I wan't the order of the queryset to be the element o...
For example, if I do
m.objects.filter(id__in=[3,1,8])
I wan't the order of the queryset to be the element o...