Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Launching our Community Forum
This is a short post just to announce today I’m releasing a community forum for the simpleisbetterthancomplex.com readers! And I want you to be part of it. I decided to create this community forum for a couple of reasons. First of all, I receive many emails with questions, asking for advice and asking my opinion about specific topics. I’m happy to answer those emails whenever I can, but unfortunately, I can’t answer them all. And when I’m able to answer those emails, the conversations and discussions have a high potential to be useful to others. So why not have some of those discussions in an open forum? With this community forum, I also want to have a place for questions that are not suitable for StackOverflow. For example, “what’s the best database to use with Django?” or “Apache or NGINX?”. This kind of questions, where there is no right or wrong answer, but can serve as a starting point for a good discussion and exchange of experience. Another reason is to have a single place to organize the readers’ requests, suggestions, and ideas for future tutorials and videos. There is a specific category for tutorials requests where you can share … -
Setup Mac for Python and more.
> We're updating this guide ri... -
Launching our Community Forum
This is a short post just to announce today I’m releasing a community forum for the simpleisbetterthancomplex.com readers! And I want you to be part of it. I decided to create this community forum for a couple of reasons. First of all, I receive many emails with questions, asking for advice and asking my opinion about specific topics. I’m happy to answer those emails whenever I can, but unfortunately, I can’t answer them all. And when I’m able to answer those emails, the conversations and discussions have a high potential to be useful to others. So why not have some of those discussions in an open forum? With this community forum, I also want to have a place for questions that are not suitable for StackOverflow. For example, “what’s the best database to use with Django?” or “Apache or NGINX?”. This kind of questions, where there is no right or wrong answer, but can serve as a starting point for a good discussion and exchange of experience. Another reason is to have a single place to organize the readers’ requests, suggestions, and ideas for future tutorials and videos. There is a specific category for tutorials requests where you can share … -
Normalize Your Django REST Serializers
When dealing with models with nested relationships, it may initially make sense to serialize them in a nested format. However, you may soon discover that this has a couple of potential issues. This structure can result in a lot of duplication in the serialized data, especially for many-to-many relationships. Since those objects are nested, you don’t have them all in one place for easy referencing or updating. Working around this requires tedious iteration and transformation. These issues are especially pronounced in Javascript applications that use state methodologies or technologies like Redux. Redux applications work much better when your data is normalized. Normalization facilitates cleaner code, makes updating state simpler, and ensures that the fewest possible UI components are forced to re-render due to such updates. When you are using an external API that you have no control over, you may be forced to normalize your data on the client. For this, you can use a tool such as normalizr. However, if you are creating your own Django REST API, you can save yourself some trouble and added frontend complexity and normalize server-side. Understand the Problem Consider an example blog application. Your models might look like this: from django.db import models … -
Normalize Your Django REST Serializers
When dealing with models with nested relationships, it may initially make sense to serialize them in a nested format. However, you may soon discover that this has a couple of potential issues. This structure can result in a lot of duplication in the serialized data, especially for many-to-many relationships. Since those objects are nested, you … Continue reading Normalize Your Django REST Serializers The post Normalize Your Django REST Serializers appeared first on concise coder. -
Terminal Prompt Formatting
When you open up `Terminal` fo... -
MedX App: Secure, Real-time Healthcare Messaging with PubNub and AWS Translate
The healthcare industry is hungry for innovation. Companies like MedX are driving that innovation, using technology to revolutionize how healthcare happens. MedX is a secure, compliant, real-time messaging solution (iOS/Android) that improves quality of care for patients by streamlining doctor-to-doctor communication. As MedX’s development partner, Distillery was fortunate to help build the solution. The post MedX App: Secure, Real-time Healthcare Messaging with PubNub and AWS Translate appeared first on Distillery. -
Django Depends on You: A Takeaway from DjangoCon
DjangoCon 2018 attracted attendees from around the world, including myself and several other Cakti (check out our DjangoCon recap post). Having attended a number of DjangoCons in the past, I looked forward to reconnecting with old colleagues and friends within the community, learning new things about our favorite framework, and exploring San Diego. While it was a privilege to attend DjangoCon in person, you can experience it remotely. Thanks to technology and the motivated organizers, you can view a lot of the talks online. For that, I am thankful to the DjangoCon organizers, sponsors, and staff that put in the time and energy to ensure that these talks are readily available for viewing. Learn How to Give Back to the Django Framework While I listened to a lot of fascinating talks, there was one that stood out and was the most impactful to me. I also think it is relevant and important for the whole Django community. If you have not seen it, I encourage you to watch and rewatch Carlton Gibson’s “Your web framework needs you!". Carlton was named a Django Fellow in January of 2018 and provides a unique perspective on the state of Django as an open … -
Django Depends on You: A Takeaway from DjangoCon
DjangoCon 2018 attracted attendees from around the world, including myself and several other Cakti (check out our DjangoCon recap post). Having attended a number of DjangoCons in the past, I looked forward to reconnecting with old colleagues and friends within the community, learning new things about our favorite framework, and exploring San Diego. While it was a privilege to attend DjangoCon in person, you can experience it remotely. Thanks to technology and the motivated organizers, you can view a lot of the talks online. For that, I am thankful to the DjangoCon organizers, sponsors, and staff that put in the time and energy to ensure that these talks are readily available for viewing on YouTube. Learn How to Give Back to the Django Framework While I listened to a lot of fascinating talks, there was one that stood out and was the most impactful to me. I also think it is relevant and important for the whole Django community. If you have not seen it, I encourage you to watch and rewatch Carlton Gibson’s “Your web framework needs you!". Carlton was named a Django Fellow in January of 2018 and provides a unique perspective on the state of Django as … -
Django ComputedField()
A very common pattern, at least in code that I've written (and read) is to annotate on a field that uses an expression that is based on one or more other fields. This could then be used to filter the objects, or just in some other way. The usual method of doing this is: {% highlight python %} from django.db import models from django.db.models.expressions import F, Value from django.db.models.function import Concat class PersonQuerySet(models.query.QuerySet): def with_name(self): return self.annotate( name=Concat(F('first_name'), Value(' '), F('last_name'), output_field=models.TextField()), ) class Person(models.Model): first_name = models.TextField() last_name = models.TextField() objects = PersonQuerySet.as_manager() {% endhighlight %} Yes, I'm aware of [falsehoods programmers believe about names](https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/), but this is an easy-to-follow example. In order to be able to access the `name` field, we must use the `with_name()` queryset method. This is usually okay, but if it is something that we almost always want, it can be a little tiresome. Alternatively, you could override the `get_queryset()` method of a custom manager, but that makes it somewhat surprising to a reader of the code. There are also some places where a custom manager will not automatically be used, or where it will be cumbersome to include the fields from a custom manager … -
Custom Domains for Zappa Projects
For web applications, a custom... -
Custom Domains for Zappa Projects
For web applications, a custom... -
RDS Database for Serverless Django + Zappa on AWS Lambda
This is a critical piece of ha... -
Serverless Django with Zappa on AWS Lambda
Going serverless with Django a... -
Prepare AWS IAM User, Role, and Policies for Zappa and Serverless Python
This is [Zappa](https://www.za... -
A tour on Python Packaging
If you're new to Python or a mature one and want to share your code with other developers or you have build a library to be used by end users and you're struggle with the packaging, then this tutorial/post/explanatory guide is (possibly) for you. Prerequisites Assumptions Packaging in Python Modularity PyPI setuptools wheel twine pip Difference between sdist and bdist_wheel The basics Name Cookiecutter Structure requirements_dev.txt Makefile LICENSE docs/, AUTHORS.rst, CONTRIBUTING.rst, HISTORY.rst and README.rst tests/ and tox.ini setup.py Metadata Requirements install_requires python_requires extras_require Entry points Packaging Wheels (aka built distribution) Sdist (aka source distribution) Packages zip_safe test_suite setup.cfg MANIFEST.in Upload keyring Installing your uploaded package Sum up Resources Python packaging-related videos Python packaging-related podcasts Python packaging-related articles Prerequisites First of all, you must understand some basics around Python packaging terminology or else this (useful) post will turn into an incomprehensible one! Your first stop is packaging glossary. In there, you'll find the terminology around python packaging. Some things I would like to highlight: artifact (not listed): fancy word for file source distribution (sdist): simple, source only .tar.gz archive. Only for pure Python modules/packages (ones that do not contain any C/C++ code). The institution set up to deal with distribution in … -
Python Overtakes Java
It's fitting that the first bl... -
Get List of Current Users
We get this question a good am... -
Facebook's Parse is Closing
[Parse](http://parse.com/) is ... -
Python Cheat Sheet
A quick reference guide for us... -
My Equipment
### Computer Laptop: [http:... -
AngularJS vs jQuery
### AngularJS is a framework ... -
Django App Structure
To make your individual Django... -
Syncdb is ... gone?
Yup `python manage.py syncdb` ... -
A Fantastic Ted Talk
This is by far one of the most...