Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Dataset Resources
In our [Machine Learning](/cou... -
Bringing FeinCMS and django-content-editor/feincms3 closer together
Bringing FeinCMS and django-content-editor/feincms3 closer together If I had more time those are the features I would try to implement next: Reimplement FeinCMS’s TreeEditor using django-mptt’s DraggableMPTTAdmin This shouldn’t be a big effort. The toggleable booleans are probably the only feature from the TreeEditor that haven’t made it into django-mptt. Add features to django-content-editor Moving content blocks as a group It would be awesome if it was possible to collapse the content blocks’ fieldsets, mark consecutive blocks and move them as a group. Adding content blocks in the middle and improving reordering Right now it’s only possible to add new content blocks at the end; only after saving is it allowed to move new blocks in-between pre-existing content. This is a limitation of django’s InlineFormset respectively of django-content-editor’s naive reuse which expects new inline instances to always be ordered after existing forms. I suspect that by using flexbox’s order attribute and some custom JavaScript code it should be possible to keep the ordering of inlines stable in the HTML code. If that was true the backend code wouldn’t have to be changed, which would also keep maintenance lower for the future. The ItemEditor from FeinCMS supports adding content in the … -
The state of things in FeinCMS 1.x land
The state of things in FeinCMS 1.x land FeinCMS is still in active use, but not very actively developed. This does not have to be a bad thing – FeinCMS is compatible with the recently released Django 2.1 back to Django 1.7, it works well and it’s pain points are generally well known by long time users. Slow development also means minimal breakage because of new incompatibilities, not bad either. That being said, here’s a list of things with I find bothersome when working with FeinCMS: The extension mechanism and create_content_type are brittle. Many hacks and workarounds and fumbling with Django’s internals were necessary over the years to avoid invalid and/or incomplete model meta information. Also, testing the dynamic creation of models is hard to test and most breakages were very hard to reproduce. It has a few features which make it hard to know what’s going on. There’s no single place to look if you want to know what fields the page model has. There’s no place no look if you want to know what happens when processing a request because request and response processors and also the content types themselves all have ways to interfere and even short … -
What did FeinCMS get right?
What did FeinCMS get right? Here’s a list of things FeinCMS got right. The list will never be exhaustive. Sites are different. Building a framework and not a single product covering all use cases is still a good idea. Also, we are building on top of Django, so we shouldn’t have to sell the advantages of using a framework compared to using a ready-made CMS which looks better when comparing features but not when really working with it day to day. The ItemEditor and its structuring of content (e.g. keeping images separate, rigidly clean HTML blobs) is still the right way to do it, even though I can’t disagree that the interface for editors might be improved. Making things reusable (the ItemEditor for blog entries, the TreeEditor for any tree shaped data) was the right thing to do. The tree editor code has its descendants (pun intended) everywhere, in django-mptt, in django-treebeard and also in other projects. It also seems to me that the same ideas ItemEditor implements have found their way into other projects, although I’m certainly not claiming credit for all those. Staying close to Django’s administration interface instead of diverging (and having to rebuild functionality at great … -
The other future of FeinCMS: django-content-editor and feincms3
The other future of FeinCMS: django-content-editor and feincms3 The FeinCMS ItemEditor code lives on in a new project, django-content-editor1. By contrast feincms3 is a completely new project, which was the result of starting to build websites with a stripped down environment of django-content-editor and django-mptt2 only. feincms3 avoids many of the downsides of FeinCMS 1.x by doing less. At first sight it sounds like building a website with feincms3 will be more work. In my view this does not have to be, since feincms3 offers more direct ways of achieving the same results. feincms3 addresses FeinCMS’ issues by: It does not offer concrete models, only mixins. Because of this, all problems with dynamic model creation and the extensions mechanism simply disappear. You write the page model yourself, so you’ll know what fields it has. No request and response processors, and plugins (content types in FeinCMS 1.x) do not have any ways of interferring with request and response processing. This makes at all times obvious what’s going to happen when processing a request. Redirects? Easy, DIY in your own, short view function. The automatic creation of inlines for the admin interface is gone. This avoids the custom feincms_item_editor_inline protocol, and its … -
The future of FeinCMS
The future of FeinCMS A recent exchange in an issue in the elephantblog repository on Github asking whether the project was still alive and my own work on feincms3 made me think about the need to clarify my position on the future of FeinCMS 1.x. In the issue I wrote that it (meaning elephantblog) is mostly in maintenance mode and not actively developped anymore, and I also pointed people towards feincms3 for new projects. There are a lot of things FeinCMS 1.x got right and there are things that could be better or I could have handled better. The state of things in FeinCMS 1.x land What did FeinCMS get right? (not published yet) The other future of FeinCMS: django-content-editor and feincms3 (not published yet) -
Writing documentation
Writing documentation Why do I like writing documentation? A good part of it is that I am writing docs for myself. Similar to writing tests or commit messages, writing docs is a way of thinking about the same issues from a different viewpoint, with a different part of the brain so to speak. Sometimes code feels bad, but it’s hard to tell why. Surprisingly often the badness really shows itself as soon as I start writing docs. The Zen of Python says it much better than I could: If the implementation is hard to explain, it’s a bad idea. If the implementation is easy to explain, it may be a good idea. When do I write documentation? I mostly start writing documentation when the first or second iteration of a project basically works and when it is time to move towards the beta quality stage. Documenting alpha quality software is mostly not worth the effort; it only adds documentation churn to code churn. Documenting a 1.0 release is too late except for trivial software, since documenting often surfaces simpler ways to achieve the same results. Docs I spent a lot of time on I’m quite proud of the following projects’ … -
Diverse Speaker Line-up for DjangoCon is Sharp
Above: Caktus Account Manager Tim Scales gears up for DjangoCon. We’re looking forward to taking part in the international gathering of Django enthusiasts at DjangoCon 2018, in San Diego, CA. We’ll be there from October 14 - 19, and we’re proud to attend as sponsors for the ninth year! As such, we’re hosting a mini golf event for attendees (details below). This year’s speakers are impressive, thanks in part to Erin Mullaney, one of Caktus’ talented developers, who volunteered with DjangoCon’s Program Team. The three-person team, including Developer Jessica Deaton of Wilmington, NC, and Tim Allen, IT Director at The Wharton School, reviewed 257 speaker submissions. They ultimately chose the speakers with the help of a rating system that included community input. “It was a lot of fun reading the submissions,” said Erin, who will also attend DjangoCon. “I’m really looking forward to seeing the talks this year, especially because I now have a better understanding of how much work goes into the selection process.” Erin and the program team also created the talk schedule. The roster of speakers includes more women and underrepresented communities due to the DjangoCon diversity initiatives, which Erin is proud to support. What we’re excited … -
Diverse Speaker Line-up for DjangoCon is Sharp
Above: Caktus Account Manager Tim Scales gears up for DjangoCon. We’re looking forward to taking part in the international gathering of Django enthusiasts at DjangoCon 2018, in San Diego, CA. We’ll be there from October 14 - 19, and we’re proud to attend as sponsors for the ninth year! As such, we’re hosting a mini golf event for attendees (details below). -
Django Tips #3: Template Structure
Best practices for templates in Django. -
How to Integrate a C Library into an iOS App Written in Swift
Nowadays, everyone values privacy and security. That’s why it wasn't surprising when, recently, we needed to use an encryption library on one of our Distillery projects. For the project in question, the decision was made to use libsignal. Originally developed for Signal Private Messenger, libsignal has a good reputation among security specialists. The post How to Integrate a C Library into an iOS App Written in Swift appeared first on Distillery. -
Podcast.__init__ Interview - The Business of Technical Authoring
An interview with Tobias Macey on learning and teaching Django. -
Alexa, What Can You Teach Me Today? Distillery Developer Attends Alexa Dev Day
We shouldn’t take Alexa for granted. While Amazon’s intelligent assistant may seem capable of answering our every whim and inquiry, it takes a lot of behind-the-scenes development to make it happen. Just ask Distillery Android Developer Dmitry Sitnikov. The post Alexa, What Can You Teach Me Today? Distillery Developer Attends Alexa Dev Day appeared first on Distillery. -
Alexa, What Can You Teach Me Today? Distillery Developer Attends Alexa Dev Day
We shouldn’t take Alexa for granted. While Amazon’s intelligent assistant may seem capable of answering our every whim and inquiry, it takes a lot of behind-the-scenes development to make it happen. Just ask Distillery Android Developer Dmitry Sitnikov. The post Alexa, What Can You Teach Me Today? Distillery Developer Attends Alexa Dev Day appeared first on Distillery. -
Alexa, What Can You Teach Me Today? Distillery Developer Attends Alexa Dev Day
We shouldn’t take Alexa for granted. While Amazon’s intelligent assistant may seem capable of answering our every whim and inquiry, it takes a lot of behind-the-scenes development to make it happen. Just ask Distillery Android Developer Dmitry Sitnikov. The post Alexa, What Can You Teach Me Today? Distillery Developer Attends Alexa Dev Day appeared first on Distillery. -
Distillery Developer Attends Scala Days Conference in New York
At the 2018 Scala Days North America conference, Distillery Scala Developer Artem Mitrakov learned many things. Chiefly, however, he learned how incredibly much there is to learn about Scala. The Scala community is steaming ahead, actively developing Scala-based technologies and frameworks (e.g., Apache Spark, Akka Streams, Akka HTTP, Apache Kafka) that, according to Artem, “can help make apps more efficient, stable, and robust.” The post Distillery Developer Attends Scala Days Conference in New York appeared first on Distillery. -
Distillery Developer Attends Scala Days Conference in New York
At the 2018 Scala Days North America conference, Distillery Scala Developer Artem Mitrakov learned many things. Chiefly, however, he learned how incredibly much there is to learn about Scala. The Scala community is steaming ahead, actively developing Scala-based technologies and frameworks (e.g., Apache Spark, Akka Streams, Akka HTTP, Apache Kafka) that, according to Artem, “can help make apps more efficient, stable, and robust.” The post Distillery Developer Attends Scala Days Conference in New York appeared first on Distillery. -
Distillery Developer Attends Scala Days Conference in New York
At the 2018 Scala Days North America conference, Distillery Scala Developer Artem Mitrakov learned many things. Chiefly, however, he learned how incredibly much there is to learn about Scala. The Scala community is steaming ahead, actively developing Scala-based technologies and frameworks (e.g., Apache Spark, Akka Streams, Akka HTTP, Apache Kafka) that, according to Artem, “can help make apps more efficient, stable, and robust.” The post Distillery Developer Attends Scala Days Conference in New York appeared first on Distillery. -
Django Filters Problem: How To Display All Results When The Filter Is Not Set
If a view extends django-filter's FilterView it may look similar to this: from django_filters.views import FilterView from .filters import JobFilter class JobList(FilterView): model = Job paginate_by = 20 filterset_class = JobFilter JobFilter has a single filter field city that filters jobs by city and generate URL like /jobs/?city=London ... Read now -
Angular API Calls with Django, Part 2: Building the Micro-Blog App
Angular API Calls with Django, Part 2: Building the Micro-Blog App Keith Dechant Sun, 09/09/2018 - 07:24 This is the second part of a two-part series exploring the use of the Angular 6 HttpClient to make API calls against a Django back-end using Django Rest Framework. In the first part, we learned how to authenticate against Django using the Django Rest Framework JWT package. This post demonstrates how to set up the Django models and views for the micro-blogging app, as well as the Angular Service and templates. -
Step 1: Disinterring and Reviving To Life
I shelved/buried my blog when I upgraded to a new Slicehost Linode six years ago. I didn't have it on Github or Gitlab, or on my personal dev machine, and it seemed to be completely purged from my little server. My last hope was the tarball labelled fullbackup.tar.gz in the home dir of the server. Oh, but by the way, my server was out of disk space and I was doing all this while on vacation in rural Nova Scotia, where high speed Internet is still a far-away dream. Step 0: Bytes. Their Burdensome Storage. Their Inscrutable Movement. One of the first things I learned was how to get Linux to expand its volume to use up new capacity generously granted to me by Linode. After trying lots of things and fretting about how I hadn't set up lfs and so on, here's what I found out: You go to the Linode manager site You click the volume you want to increase You set the new size (I pushed it up to the new maximum of my plan) That's it. Well, I think I had to power off my VM while I did that. I can't remember. Anyway, I'm still … -
This Is An Old Blog
This blog started in the winter of 2008. I'd been in the industry for a few years and Django had reached 1.0. I figured it was time to make myself a blog, knowing, even then, that it was completely unnecessary. I just wanted the practice. My last post (something not-that-great about Christmas) was, until now, from December 2012. Anyway, a lot has changed in the software world. I've also caught up with a few things I wish I'd known 10 years ago. So, lacking anything else to write about. I'm going to try and refurbish this blog and write about that. Here's just a few of the things to address: deployment - this thing deployed via git, I wouldn't mind making it into a tidy little docker image Django version - running on Django 1.0, which is only 13 major releases out of date CI/CD - didn't have any, now I want some tests - LOL new server - this thing is snuggled into a janky 14.04 server. I want to move to my new 18.04 server new postgres - the older server's running Postgresql 9.3 new design - It'd be nice if this thing looked a little better disable … -
Django Tips #1: makemigrations command
Why it's a best practice to explicitly call makemigrations -
Django Tips #2: Imports
Python and Django best practices for imports. -
Why Use A DevOps Pipeline Diagram Generator To Visualize Optimization
DevOps, short for development and operations, is a hot topic in the technology sector. That is because optimizing DevOps pipelines is a crucial component of business strategies for many operations today. Recently, new tools have been made available online that make DevOps pipeline optimization much simpler for those professionals responsible for the job. These tools make it possible to create a DevOps process flow diagram that allows you to visualize your entire DevOps process. Find out the advantages of using a DevOps pipeline diagram generator in the post below. The post Why Use A DevOps Pipeline Diagram Generator To Visualize Optimization appeared first on Distillery.