post-thumbnail

Django ORM: Structure and Principles of QuerySet

This summary is adopted from SoungRyoul Kim's session during Pycon Korea 2020database is accessed only when needed, for only the needed amount.if all

2020년 11월 14일
·
0개의 댓글

[python] sorting nested dictionary, json serializing, subscriptable, boto3

Consider the following dictionary format.If we were to sort by downloads first, then all items with no downloads sorted by date, we can do so by using

2020년 10월 25일
·
0개의 댓글

Django migrations, django-filters, permissions

Migration history can be found in django_migrations table in your database. An article on Django models and migrationsDjango-filter package(https&#x3A

2020년 10월 25일
·
0개의 댓글

Summary of PEP 8

not None and truthy are not equivalent. For instance, empty lists are evaluated as falsy, yet they are not None.

2020년 10월 20일
·
0개의 댓글

Grouping Output in Django

Adopted from this question on stackoverflowIf you want to order serialized data like below:Try using a defaultdictAdditionally, multiple arguments can

2020년 10월 5일
·
0개의 댓글

How to Deploy Django Channels 2.x on AWS Elastic Beanstalk

How to Deploy Django Channels 2.x on AWS Elastic BeanstalkChannels Examples

2020년 10월 5일
·
0개의 댓글

Lambda + API Gateway + WebSocket

Creating a Chat App with Serverless, WebSockets, and Python: A Tutorial\*\* modify iamRoleStatements if any error occurs:Adding Websockets to your AWS

2020년 10월 5일
·
0개의 댓글

Django ContentTypes Framework

Django contenttypes documentation(https://docs.djangoproject.com/en/3.1/ref/contrib/contenttypes/\[Simpleisbetterthancomplex blog on content type

2020년 9월 22일
·
0개의 댓글

Verify model field changed / exclude specific instances from queryset / provide custom 'queryset' to PrimaryKeyRelatedField / request.data vs request.body

Check self.\_state of the model.self.\_state.adding is True when the model is being created.self.\_state.adding is False when the model is being updat

2020년 9월 22일
·
0개의 댓글

Accessing request.user in models.py and signals.py

from stackoverflowIt is important that you use threading.local instead of using a dictionary with threading.current_thread, as the latter may lead to

2020년 9월 22일
·
0개의 댓글

Datetime Internationalization in Django

Referenced articles: (1) spoqa (2) Naive datetime only stores date / time information Aware datetime Additionally stores timezone info Rule of thum

2020년 9월 22일
·
0개의 댓글

Django Notifications

Often times we need to implement a social networking service-like notification system. django-notifications-hq can facilitate your implementation in s

2020년 9월 22일
·
0개의 댓글

Cleanup Files On Model Delete in Django

Code examples adopted from this blogAttached files are not automatically deleted if your model has FileField or ImageField.

2020년 9월 22일
·
0개의 댓글

Sending HTML emails with embedded images from Django

Code examples adopted from this blogImage table will be rendered as such:Email headers will look like this:In production it may be better to reference

2020년 9월 22일
·
0개의 댓글
post-thumbnail

What is __pycache__?

Original answer on stackoverflow

2020년 9월 13일
·
0개의 댓글

Use DRF Serializers Effectively in Django

When used fittingly, source simplifies a lot of common patterns.To serialize username field to user_name key, add a CharField on the serializer with a

2020년 9월 13일
·
0개의 댓글

Validate Uploaded File Size and Type in Django

Because input file validation is a common step used widely throughout app APIs, it is more efficient to create a separate validator and reuse it.pip i

2020년 9월 12일
·
1개의 댓글

Building a Django Notification System

pip install django-activity-streamdjango-activity-stream documentationpip install stream-djangostream-django github

2020년 9월 12일
·
0개의 댓글

Elastic Beanstalk with PostgreSQL

When updating your elastic beanstalk with PostgreSQL RDS, you may encounter the following error:ERROR: Your requirements.txt is invalid. Snapshot your

2020년 9월 10일
·
0개의 댓글
post-thumbnail

Server Fundamentals

provides a variety of multi-processing moduels (MPMs)flexible architecture for choosing different connection and request handling algorithmsflexibilit

2020년 9월 10일
·
0개의 댓글