Summary of PEP 8

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

약 4시간 전
·
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일
·
0개의 댓글

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개의 댓글
post-thumbnail

Adopting PostgreSQL (DRF)

PostgreSQL arrays are enclosed by {}, not \[]More about psycopg2 usage can be found here

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

DRF - Notes

Core arguments in serializer fields read_only Set this to True to ensure that the field is used when serializing a representation, but is not used whe

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

Django Web Socket

Chat bots Real time dashboard Live tracking of IoT device Web socket protocol was standardized in 2011 and all modern browsers provide built-in suppo

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