All Posts Create a Post  
0
votes
93
views
Auto-create primary key used when not defining a primary key type warning in Django
Posted at 1 month, 2 weeks ago / May 2, 2021, 11:26 a.m.

I just updated my python from 3.9.1 to 3.9.4. When I tried to run the server. The console gave me a warning for this: WARNINGS: learning_logs.Entry: (models.W042) Auto-created primary key …

172 2 2 0
0
votes
102
views
Converting django object values dict into native datatype
Posted at 2 months, 1 week ago / April 7, 2021, 8:53 p.m.

I’m trying to get specific fields from my database using the object.values() attribute, as such: stocks = Stock.objects.values("ticker", "stock", "exchange__exchange_code", "earnings_yield", "roic") The reason I’m not using Stock.objects.filter()... is because …

172 2 2 0
0
votes
96
views
NOQA: Simple PEP8 Warning Suppression
Posted at 2 months, 1 week ago / April 7, 2021, 7:25 a.m.

No Quality Assurance (# noqa) is a computer programming directive by which a programmer can instruct errors to be ignored for a given line. The NOQA syntax is used in …

172 2 2 0
0
votes
160
views
How to display serializer in delete action with django rest swagger
Posted at 5 months, 1 week ago / Jan. 8, 2021, 11:21 a.m.

By default, django rest swagger doesn’t displayed the Serializer in DELETE method. But, for some reason I need to implement prevent deletion & force deletion case. So, basicly to implement …

172 2 2 0
0
votes
250
views
Django rest clean up before validation
Posted at 7 months, 4 weeks ago / Oct. 22, 2020, 11:14 a.m.

Sometime we need to clean up the value before it validated by an exiting validations. For example, when user sended an longitude and latitude data into backend with multiple length …

172 2 2 0
1
votes
170
views
what is nodeJs
Posted at 8 months ago / Oct. 21, 2020, 1:39 p.m.

Node.js is an open-source, cross-platform, back-end, JavaScript runtime environment that executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side …

1 1 1 0
0
votes
278
views
How to custom select language icon in django administration
Posted at 8 months, 1 week ago / Oct. 11, 2020, 8:04 a.m.

1. Add the base_site file inside templates/admin/base_site.html. {% extends "admin/base.html" %} {% load static i18n %} {% block title %}{{ title }} | {{ site_title|default:_('Situs django admin') }}{% endblock %} …

172 2 2 0
0
votes
278
views
How to setup all raw_id_fields and search_fields for django
Posted at 8 months, 1 week ago / Oct. 11, 2020, 8:04 a.m.

For example I have this 3 fields as question_set, question and folder. I need to assign all of this fields into raw_id_fields inside the admin.ModelAdmin without add manually per-single fields. …

172 2 2 0
0
votes
298
views
Awesome django books by agiliq.com
Posted at 8 months, 1 week ago / Oct. 11, 2020, 8:04 a.m.

This awesome django books for refference is also open sourced at https://github.com/agiliq/books Django Admin Cookbook (Django 2.0) Django ORM Cookbook (Django 2.0) Building APIs with Django and Django Rest Framework …

172 2 2 0
0
votes
560
views
How to automaticly backup your projects into external hardisk in ubuntu?
Posted at 8 months, 1 week ago / Oct. 11, 2020, 8:04 a.m.

Rsync, which stands for “remote sync”, is a remote and local file synchronization tool. It uses an algorithm that minimizes the amount of data copied by only moving the portions …

172 2 2 0
  Page 2 of 12