Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
How to: Run Django using Docker and Docker Compose
Read the full article -
Steaming on, eating jam
Image credit: The SmithsonianIn the last few months, development of the upcoming Evennia 0.9 has been steaming on. Evennia is, as you may know, a Python library for creating text-based multiplayer games (MUDs, MUSH etc).But it's not all backend work! There is also some sweet game-jamming going on, I get to that at the end. Evennia progress towards Python3 The regular Evennia develop branch is now running completely in Python 3. Since we are using some new features of this Python release, we will be aiming for Python 3.7 as a minimum version once Evennia 0.9 goes stable. We will also use Django 2.1 and likely Twisted 19 - so we'll be pretty much up-to-date on all our main dependencies.Now, while the release of Evennia 0.9 is still some time away (there are a bunch of regular bug fixes and minor features that I want to get in there too (see the progress here on the github 0.9 project page), it's worth to consider how much work it'll be for you to migrate and if you should wait or jump in right now.If you are new, I still recommend you use regular master branch Evennia (using Python 2.7). This is … -
Congrats to Distillery Partner PubNub on $23M in Series D Funding!
Following its $23M Series D round of funding, global data stream network (DSN) PubNub has the funding it needs to achieve its next stage of growth. The post Congrats to Distillery Partner PubNub on $23M in Series D Funding! appeared first on Distillery. -
My questions for prospective employers (Director/VP roles)
Last time I was looking for a job, I wrote up a list of questions I wanted to ask prospective employees. I just ran across the list again, and figured I’d share. I was looking for a senior management role (Director/VP-level) in Engineering or Security, so the questions are sloped in that direction. Also note that I was in a fairly strong position; I didn’t need the a job immanently. So, I was able to ask fairly direct, challenging questions. -
Family Trip to Joshua Tree
We took a family trip to Joshua Tree National Park to see the spring wildflowers in bloom. Our daughter Uma loved the fresh air and sunshine. Here, Daniel and Uma enjoy the beautiful scenery of the giant boulders. -
Family Trip to Joshua Tree
We took a family trip to Joshua Tree National Park to see the spring wildflowers in bloom. Our daughter Uma loved the fresh air and sunshine. Here, Daniel and Uma enjoy the beautiful scenery of the giant boulders. -
Family Trip to Joshua Tree
We took a family trip to Joshua Tree National Park to see the spring wildflowers in bloom. Our daughter Uma loved the fresh air and sunshine. Here, Daniel and Uma enjoy the beautiful scenery of the giant boulders. -
Avoid Memory Issues with Django’s bulk_create
When inserting a large number of objects into the database with Django, your first thought should be to use bulk_create. It is much more efficient than calling create for each object, and it generally only results in a single query. However, when dealing with tens of thousands, hundreds of thousands, or even more objects, you … Continue reading Avoid Memory Issues with Django’s bulk_create The post Avoid Memory Issues with Django’s bulk_create appeared first on concise coder. -
Avoid Memory Issues with Django’s bulk_create
When inserting a large number of objects into the database with Django, your first thought should be to use bulk_create. It is much more efficient than calling create for each object, and it generally only results in a single query. However, when dealing with tens of thousands, hundreds of thousands, or even more objects, you … Continue reading Avoid Memory Issues with Django’s bulk_create The post Avoid Memory Issues with Django’s bulk_create appeared first on concise coder. -
React Hooks - A deeper dive featuring useContext and useReducer
This article looks at how React JS hooks can be used to make React applications and their state management clean and efficient. -
Distillery Is Now a Certified Google Cloud Technology Partner!
We couldn’t be happier to announce that Distillery has now been certified as a Google Cloud Technology Partner! You might even say we’re on cloud nine about it. The post Distillery Is Now a Certified Google Cloud Technology Partner! appeared first on Distillery. -
Jupyter Notebook Server with AWS EC2 and AWS VPC
# Create your VPC You need a ... -
Summaries of the Python meetup in Amsterdam
I've made notes again at the 2019-04-11 Amsterdam Python meetup in the byte office. Here are the summaries. Ethics in IT - Nick Groenen Computer systems are taking over the world. They're influencing everything. A lot of good has come out of this. But there's also a downside. We're talking (at meetups like this, for instance) mostly about tech, not about the people that build it or the people affected by it. Nick Groenen calls that an ethics problem. As an example, Uber's "greyball" that was originally written for a good purpose but that was later used to mislead governments. Same with Volkswagen's diesel emissions scandal: detecting when there's an official test and adjusting the motor parameters to seem more environmentally friendly. How ethical is it to work on something like that? The above examples are of big companies. But what about working for smaller companies? You have the same ethical challenges there. What are you doing with your logfiles? How much information do you mine about your customers? Do you give customers' data to your boss when he asks about it even though it isn't allowed by your privacy policy? And how do you treat new programmers? Is there … -
How to Score A+ for Security Headers on Your Django Website
This is a blog post version of the talk I gave at DjangoCon Europe 2019 on the 10th April. The web is an evolving platform with a lot of backwards compatibility concerns. New web security practices often come from a realization that an old feature has some flaw. Rather than break old websites by changing such features, there are a bunch of more secure behaviours to opt in to. You can do this by setting HTTP headers. Securityheaders.com is a tool run by security consultant Scott Helme to create a report on these security headers. It gives any URL a score from F to A+, which is a nice simple way of measuring your security posture. Though, like any automated report, it needs need some human interpretation to factor in context. (I’d also recommend the Mozilla Observatory security scanner, but I’m not using it here because it does way more than security headers.) As an example, Yahoo scores an A+ on Securityheaders.com: Whilst (at time of writing) Google scores a C: This is a guide on how to configure a typical Django web application to score that magic A+. You can beat Google, protect your users, and impress your boss, … -
5 Things to Keep in Mind When Designing Your Business Logo
When designing your logo, you should pay close attention from the very first step in the design process. After all, your logo says a lot about your business. The post 5 Things to Keep in Mind When Designing Your Business Logo appeared first on Distillery. -
How to Save Extra Data to a Django REST Framework Serializer
In this tutorial you are going to learn how to pass extra data to your serializer, before saving it to the database. Introduction Example Using APIView Example Using ViewSet Introduction When using regular Django forms, there is this common pattern where we save the form with commit=False and then pass some extra data to the instance before saving it to the database, like this: form = InvoiceForm(request.POST) if form.is_valid(): invoice = form.save(commit=False) invoice.user = request.user invoice.save() This is very useful because we can save the required information using only one database query and it also make it possible to handle not nullable columns that was not defined in the form. To simulate this pattern using a Django REST Framework serializer you can do something like this: serializer = InvoiceSerializer(data=request.data) if serializer.is_valid(): serializer.save(user=request.user) You can also pass several parameters at once: serializer = InvoiceSerializer(data=request.data) if serializer.is_valid(): serializer.save(user=request.user, date=timezone.now(), status='sent') Example Using APIView In this example I created an app named core. models.py from django.contrib.auth.models import User from django.db import models class Invoice(models.Model): SENT = 1 PAID = 2 VOID = 3 STATUS_CHOICES = ( (SENT, 'sent'), (PAID, 'paid'), (VOID, 'void'), ) user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='invoices') number = models.CharField(max_length=30) date = … -
IQ isn't enough to get hired
I’ve interviewed hundreds of people for technical roles, and a pattern has emerged. In general, we reject many more candidates for social skills than for technical competence. In fact, most technical interview funnels are arranged so that technical screens are earlier. This means that if you reach an interview, you’ve probably (mostly) passed the technical part, and are now being judged mostly on EQ. If you get rejected at this point, it’s probably because of social skills. -
Django versus Flask with Single File Applications
A lot of people pick Flask over Django because they believe it is simpler to start with. Indeed, the Flask front page includes an 8 line “hello world” application, whilst the Django default project has 172 lines in 5 files, and still doesn’t say “hello world”! (It does show you a welcome rocket and have a full admin interface though, both are pretty fun). It is also possible to make a single file “hello world” application in Django, although it’s probably something most Django developers haven’t seen done. It takes a bit more code than Flask, but it’s still quite understandable. Let’s take a look at the Flask and Django implementations and use them to compare the two frameworks. Application We’ll be using the simple “hello world” application from the Pallets page on Flask (plus a security fix). It has one page which gets a name from the URL or the default “world”, and returns that with a “hello” message. For example: In Flask Here is the code, 10 lines long, tested on Flask 1.0.2 and Python 3.7.2: (I added html.escape to the Flask example, to fix a security problem.) import html from flask import Flask, request app = Flask(__name__) … -
Bring Your Logo to Life: 20 Gorgeous Logo Animations to Inspire You
A good logo leaves a clear image of the product or company in viewers’ minds long after they’ve seen it. By adding motion that helps to tell a brand’s story, animated logos can be highly effective in making a lasting impression. The post Bring Your Logo to Life: 20 Gorgeous Logo Animations to Inspire You appeared first on Distillery. -
Goals aren't enough; you have to talk about performance, too
Craig recently wrote about his mixed opinions about OKRs. The crux of his argument, I think, is that communicating goals is the important thing, and that OKRs are a heavyweight tool (with limited success). I agree, somewhat; this post is a “yes, and”: OKRs (when done well) do one other important thing: force explicit conversations about performance. Talking about goals can be fairly easy compared to talking about performance. But talking about performance is a basic management responsibility, and unfortunately it’s frequently done poorly (if at all). -
Essential PyCharm (Intellij) Plugins To Improve Productivity
As per 2019 JetBrains survery, PyCharm is the most widely used(36%) IDE for Python development. Eventhough PyCharm comes with lot of built in features, there are a lot of plugins available for PyCharm and other Intellij IDEs. In this article, we will see some plugins which will boost our productivity during development. Highlight Bracket Pair Instead of manually scanning where a bracket starts/ends, Highlight Bracket Pair will automatically hightlight the bracket pairs based on cursor position. Rainbow Brackets Highlight Bracket Pair will hightlight the bracket pair around the cursor. When there are multiple bracket pairs deeply nested, Rainbow Brackets will highlight matching bracket pairs with matching rainbow colors. Grep Console When running a django/flask server or any Python script which generates lot of output, it is hard to filter out required output on console. Grep Console can filter or highlight output based on specific conditions which makes it easier to debug the code. Save Actions Instead of manually optimizing imports or reformating code when changes are made, we can use Save Actions which will automatically run a set of actions on every file save. Key Promoter If you are new to PyCharm or an experienced user who is using mouse … -
What I Learned at PyCon Namibia 2019
I was at PyCon Namibia in Windhoek from the 19th to 21st of February, and had an amazing time! PyCon Namibia is one of the longest running PyCons in Africa, this being its fifth edition in as many years. I had the pleasure of being invited to join by Daniele Procida, after joining him at the first PyCon Ghana last summer. I couldn’t say no to another African Python adventure! (No mum, there weren’t any snakes.) I also had the great responsibility of delivering the final day keynote, on technologies that will be around in 21 years. There will be a blog post at some point, but if you want to read the slides they are on my GitHub. Outside of the conference I had great opportunities to see the country and socialize with my fellow Python developers. I joined a social day before the conference where some of the organizers gave us a tour of the Katutura area of Windhoek and a road trip around the country afterwards. Python Community Namibia is the world’s second least densely populated country, with a lot of desert and a population of 2.5 million. Comparing it to PyCon UK, the Python conference is … -
De-Google my life - Part 3 of ¯ (ツ)_/¯: Nextcloud & Collabora
Hello everyone! Welcome to the third post of my blogseries “De-Google my life”. If you haven’t read the other ones you definitely should! (Part 1, Part 2). Today we are moving forward with one of the most important apps I’m running on my servers: Nextcloud. A big part of my Google usage was Google Drive (and all it’s derivate apps). With Nextcloud I was looking to replace: Docs Drive Photos Contacts Calendar Notes Tasks More (?) I also wanted some new features, like connecting to a S3 bucket directly from my server and have a web interface to interact with it. The first step is to set up the server. I’m not going to explain that again, but if you want to read more about that, I explain it a bit better on the second post Nextcloud Installation For my Nextcloud installation I went straight to the official docker documentation and extracted this docker compose: version: '2' volumes: nextcloud: db: services: db: image: mariadb command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW restart: always volumes: - db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=my_super_secure_root_password - MYSQL_PASSWORD=my_super_secure_password - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud app: image: nextcloud ports: - 8080:80 links: - db volumes: - nextcloud:/var/www/html restart: always Some mistakes were made I … -
De-Google my life - Part 3 of ¯ (ツ)_/¯: Nextcloud & Collabora
Hello everyone! Welcome to the third post of my blogseries “De-Google my life”. If you haven’t read the other ones you definitely should! (Part 1, Part 2). Today we are moving forward with one of the most important apps I’m running on my servers: Nextcloud. A big part of my Google usage was Google Drive (and all it’s derivate apps). With Nextcloud I was looking to replace: Docs Drive Photos Contacts Calendar Notes Tasks More (?) I also wanted some new features, like connecting to a S3 bucket directly from my server and have a web interface to interact with it. The first step is to set up the server. I’m not going to explain that again, but if you want to read more about that, I explain it a bit better on the second post Nextcloud Installation For my Nextcloud installation I went straight to the official docker documentation and extracted this docker compose: version: '2' volumes: nextcloud: db: services: db: image: mariadb command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW restart: always volumes: - db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=my_super_secure_root_password - MYSQL_PASSWORD=my_super_secure_password - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud app: image: nextcloud ports: - 8080:80 links: - db volumes: - nextcloud:/var/www/html restart: always Some mistakes were made I … -
What is Django CRM and it’s advantages
Customer relationship management (CRM) is the combination of practices, strategies and technologies that companies use to manage and analyze customer interactions and data throughout the customer lifecycle, with the goal of improving customer service relationships and assisting in customer retention and driving sales growth. Importance of CRM Customer Relationship Management allows businesses to manage customer relationships including the data and information associated with the companies. The right CRM acts as a dashboard where you can manage your sales, marketing, customer service and support, tracking customers response, and assigning tasks to employees. A good CRM solution builds value by opening up vital communication channels and creating a common client-focused knowledge base. CRM system makes it easier for everyone inside your company to work together and share your ideas, strategies, plan of action and goals, that all comes together to keep your customers satisfied and loyal. Types of CRM: CRM systems are classified into two types On premise CRM system On demand CRM system On premise CRM system : Depending upon the company requirements they will design a basic CRM system with required modules and functionalities. Most probably small to mid level companies design their custom CRM system for their business …